The model template currently imports from SQLAlchemy like that:
from sqlalchemy import (Table, Column, String, DateTime, Date, Integer,
DECIMAL, Unicode, ForeignKey, and_, or_)
That list is pretty arbitrary. Why is DECIMAL imported, but not the other type aliases? Why are and_ and or_ imported, but not not_? The following three options would be more reasonable:
- use from sqlalchemy import * (this provides a quite reasonable set of names)
- import only the names that are really used in the standard model.py
- import a more complete list explicitly
I have added a patch providing the third option.
Also, the patch changes the multi-line import to use Python 2.3 syntax.