I've already split up my SQLObject model files into a models package and it 
works just fine.  I have plenty of joins and dependencies too and the ordering 
issue doesn't appear any more than it does for normal classes.

For creating a clean-slate database I just have a utility function that imports 
my models and then runs through them dropping and recreating.  Again, no 
problems.

> 
> From: Artarious <[EMAIL PROTECTED]>
> Date: 2006/03/09 Thu AM 02:52:09 GMT
> To: [email protected]
> Subject: [TurboGears] Re: bike shed #2: controllers.py vs. controllers
> 
> Jonathan LaCour wrote:
> >> Nobody is complaining about the static directory.
> >>     
> >
> > Of course not.  You can't put a bunch of images in one file, can  
> > you?  You can't put a bunch of templates into one file, can you?   
> > Totally different things, IMO.
> >
> > I still stand behind my +1 for controllers being a package, and -1  
> > for models being a package.
> >   
> I would say Jonathan is right on this.  Also, technically there is one
> problem when you split the models into multiple files: when you have
> joins, classes became dependent on another at the database level.  It
> will hurt when you are creating a new database from the model.  Since
> splitting files means loading the files in arbitrary order (usually by
> the filename), which means if you are creating a new database with table
> A which foreign key refs table B, table A will not create since B does
> not exists yet.  At the end you will end up with one of these options
> and/or a mixture of it: a) Don't use joins b) Name your files in the
> order of creation c) use a single file d) separate files should be
> imported from a __init__ .py in the package directory (order maintained
> in __init__.py).  So, -1 for models being in a package.
> 
> OTH, if separate models means each model is a separate *database* that
> would be wonderful.  But then I am asking for a new feature.
> 
> 
> Artarious
> 
> 
> 
> 

-----------------------------------------
Email sent from www.ntlworld.com
Virus-checked using McAfee(R) Software 
Visit www.ntlworld.com/security for more information


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" 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/turbogears
-~----------~----~----~----~------~----~------~--~---

Reply via email to