[albatross-users] page module import magic
Michael C. Neel
neel at mediapulse.com
Tue Jan 13 03:36:46 EST 2004
> I can imagine an app where you'd want to map the url to page
> name - maybe
> it was a mistake to change it (I was assuming that the old
> code was broken,
> and nobody would have been using hierarchies)? Dots seem more
> natural in
> the context (and it means the import hook can call the
> function directly).
Having done a good number of deep sites, I've never needed the page
modules to be in a hierarchy. Templates yes, and this works fine. I
break out page modules based on "feature" of the site, for example I may
have www_forms.py for generic handling and a few form to emails or site
search, member_forms.py to handle user logins and data, store_forms.py
to handle the ecommerce related pages, and search_forms.py to handle a
custom database search of say company locations. With the templates in
a hierarchy, it's east to register the right template for with the right
module. I also sub class each page module from a master, in which the
master defines the page_display (so all templaes see the same macros for
layout) and the page modules handle page_enter and page_process.
Then again, I've also never gone beyone the SimpleApp module for
anything I've done either =p
Mike
More information about the Albatross-users
mailing list