Are all the models executed on each server request? If so, is it still appropriate to create helper functions (to be accessed by controller function) within the model? I've been doing it this way because the helper functions I am writing usually access the db object and therefore having the helper in modules does not work. However, I am concerned that having too many helper functions could slow down each server request. Avik
On Mar 20, 2:50 pm, Thadeus Burgess <thade...@thadeusb.com> wrote: > I typically use the following naming convention > > A_widgets.py > B_settings.py > C_web2py.py > D_db.py > > -Thadeus > > > > On Sat, Mar 20, 2010 at 1:17 PM, mdipierro <mdipie...@cs.depaul.edu> wrote: > > models are executed alphabetically. You have two options: > > 1) rename one of the files: > > 2) move the widgets to a module and import the module from db.py > > > On Mar 20, 12:56 pm, Avik Basu <avikb...@gmail.com> wrote: > >> Hi, > > >> I have a several widgets in a file called widgets.py and would like to > >> use those widgets in db.py. Both db.py and widgets.py exist in the > >> models directory. However, when I use the widgets in defining table > >> fields in db.py, it does not recognize the widgets. How can I include > >> the widgets.py in db.py? > > >> Note that some of the the widgets reference the db object and so I > >> decided not to put widgets.py in the modules folder since I could not > >> reference db and the other globals from web2py. > > >> Thanks for your help. > > >> Avik > > > -- > > You received this message because you are subscribed to the Google Groups > > "web2py-users" group. > > To post to this group, send email to web...@googlegroups.com. > > To unsubscribe from this group, send email to > > web2py+unsubscr...@googlegroups.com. > > For more options, visit this group > > athttp://groups.google.com/group/web2py?hl=en. -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.