My company standardized on SQLAlchemy a while back, and we now have a
pretty comprehensive library of several hundred ORM definitions - all
of which inherit from the normal SQLAlchemy declarative_base. For
example:
from sqlalchemy.ext.declarative import declarative_base
Base = declarative_base()
class BusinessDay(Base):
__tablename__ = 'businessday'
businessdayid = Column(Integer, primary_key=True)
startdate = Column(DateTime)
enddate = Column(DateTime)
Pylons, though, wants those models to inherit from its own base class,
like:
from myapp.model.meta import Base
class BusinessDay(Base):
__tablename__ = 'businessday'
businessdayid = Column(Integer, primary_key=True)
startdate = Column(DateTime)
enddate = Column(DateTime)
I *really* don't want to maintain two separate forks of the model
definitions, one for Pylons and one for everything else. Any ideas how
I could reconcile the two?
The context of this is that I'm porting a rather large web app from
Zope2, and I'm very interested in Pylons for the job. The Zope2
version predates our adoption of SQLAlchemy and uses raw SQL, and one
of my major goals is to fix that during the process. I haven't
actually written a line of code yet, or even installed Pylons. I
experimented with TurboGears about a year ago and this was one of the
problems I ran into that made me delay the project in favor of more
urgent stuff.
--
You received this message because you are subscribed to the Google Groups
"pylons-discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/pylons-discuss?hl=en.