On Jul 7, 2009, at 11:08 AM, Yarko Tymciurak wrote: > to be visible throughout your application, you can put it in any > file in your models folder (if you want it to be visible in your > db.py or other files in models, remember that files are read in > alphabetical order in that file - so for example db.py would not see > utils.py if both were in the models folder, since db.py would be > parsed before utils.py - you would want to name something like > 0_utils.py to take care of that). > > Another alternative is to put utilities into your modules folder (or > it can be of another application name on the same web2py instance) > and import the utilities in an appropriately early place in one of > the files in your application's models file. Search recent posts > for more details on this (eg. __init__.py file, format of the import).
Thanks. Massimo, a chapter in the manual on web2py plumbing would be helpful. Not every detail, but enough to give a newcomer the lay of the land, a guide to browsing the source. What's the startup sequence, what happens when a request is received, like that. I'm sure I've seen bits and pieces of it around, but where is it when I need it.... Along those lines, the browser at <http://www.web2py.com/examples/static/epydoc/index.html > would be more useful if the docstrings for the files had more content than "This file is part of web2py Web Framework...". > > On Tue, Jul 7, 2009 at 8:35 AM, Jonathan Lundell > <jlund...@pobox.com> wrote: > > On Jul 6, 2009, at 8:55 PM, mdipierro wrote: > > > You can already define something like: > > > > def url(f,args=request.args): return URL(r=request,f=f,args=args) > > > > I always do it together with some of my other favorite shortcuts. > > Where does one put something like that, in order to be visible > throughout an application? > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@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 -~----------~----~----~----~------~----~------~--~---