[albatross-users] pagination with al-for

Andrew McNamara andrewm at object-craft.com.au
Wed Jan 7 14:51:42 EST 2004


>>Ah yes, now I remember what the problem was.
>>
>>My initial experiment with this built a "flat" module name such as 
>>__albatross_pages__one_two. The fix was to create a holding module, 
>>__albatross_pages__, to hold the page modules ... just like you've done 
>>above.
>
>I'm running into a subtle problem with the naming of modules imported
>by the page module, which prevents any objects in the imported module
>being pickled - this is a show-stopper for this method if I can't find
>a solution.

Actually, that was the problem you described - I failed to create the
dummy holding module correctly (tried to take a shortcut). Obviously
the existance of the parent module initiates deep magic in the python
intepreter.

I'm back to the problem I previously described as a "user application
structure shortcoming" - having discovered one of these "shortcomings"
in my own applications, I've changed my mind... it seems we have to
allow page modules to define classes.

I can't see any way to make the execfile() approach work with this
requirement - essentially the page modules have to be real python modules.

Even getting it to work with my "synthetic holding module" approach
will not be straighforward - I'll have to somehow hook the unpickler's
import requests.

-- 
Andrew McNamara, Senior Developer, Object Craft
http://www.object-craft.com.au/



More information about the Albatross-users mailing list