It just depends on what's less confusing for you. I'll favor importing the User class from the models module, but User is a very common class name, so in files where this can be ambiguous, either alias User to something else use "as" or use the module name.
-- Ikai Lan Developer Programs Engineer, Google App Engine Blogger: http://googleappengine.blogspot.com Reddit: http://www.reddit.com/r/appengine Twitter: http://twitter.com/app_engine On Tue, Nov 30, 2010 at 1:09 PM, Zeynel <[email protected]> wrote: > Hello, > > I have hw.py, incoming.py and register.py and they all use models. I > thought of putting them in model.py (like django) and import it. If I > do that, of course, I need to use > > query = model.User.all() > > instead of > > query = User.all() > > Is this a good idea? Or is it better to have the models in each file? > > -- > You received this message because you are subscribed to the Google Groups > "Google App Engine" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<google-appengine%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/google-appengine?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Google App Engine" 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/google-appengine?hl=en.
