Ticket #1604: model_for_sa.patch

File model_for_sa.patch, 1.0 kB (added by chrisz, 1 year ago)

Better SQLAlchemy imports in model template (this is for 1.1)

  • model.py_tmpl

    old new  
    66from sqlobject import * 
    77#end if 
    88#if $sqlalchemy == 'True' 
    9 from sqlalchemy import (Table, Column, String, DateTime, Date, Integer, 
    10         DECIMAL, Unicode, ForeignKey, and_, or_) 
     9from sqlalchemy.schema import \ 
     10    Table, Column, ForeignKey 
     11from sqlalchemy.types import \ 
     12    Binary, Boolean, Date, DateTime, Float, Integer, Interval, Numeric, \ 
     13    PickleType, SmallInteger, String, Time, Unicode 
     14from sqlalchemy.sql import \ 
     15    alias, and_, asc, between, bindparam, case, cast, column, delete, desc, \ 
     16    distinct, except_, except_all, exists, extract, func, modifier, insert, \ 
     17    intersect, intersect_all, join, literal, literal_column, not_, null, or_, \ 
     18    outparam, outerjoin, select, subquery, table, text, union, union_all, update 
    1119#if $elixir == 'True' 
    1220from elixir import * 
    1321#end if