controller inheritance:

we do a mixture of:
- leave them in /controllers , but use _ as a prefix
- put them in /controllers/shared
- put them in /lib/controllers

model inheritance:

i'd create a few files named _helpers.py , _mixins.py , etc

if you have very standardized items, you can cheat a little -- do
stuff like:

class _helper_std():
   def get_by_id( self , Session , id ):
         return Session.query( self.__class__ ).filter_by( id = id )

class user( _helper_std ) :
   pass

class group( _helper_std ) :
   pass

user= model.user().get_by_id( Session , 10001 )
group= model.group().get_by_id( Session , 10001 )


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to