Hi,

I'm working at a personal project, my homepage.  The idea is it will become
some kind of 'fat wiki', with articles in restructured text (which can include
thumbnail galleries of photoalbums etc), photoalbums (think of it as a
sqlobject with a one to may relation to picture objects) and other stuff[1].

The way I'm currently viewing things, I have a dispatcher class with
associated template that does the general page layout, with a menu etc. 
The dispatcher instanciates a few controllers (this list [2]) with the
request uri as argument, until a controller informs that it is able to
return a succesful result.  

It then calls the controllers .render() method to obtain a html fragment.

The thing I'm struggeling with right now is how to connect this 
tree of request answers.  An Article might include a photoalbum thumbnail
gallery, and the gallery itself might instanciate five picturecontroller
objects that have their looks specified by a 'picture'-kid template.

Do I just .serialize(fragement=1) the article's template and then do a 
<py:replace in the master with the results?  would this result in
elementtree reparsing the html? I think the best way would be to just put
the elementtree result of the article right into the elementtree of the
master template at runtime, but I don't know how to do that. 

.. [1]: This sounds like an ambitious project, I know, but I'm taking it easy
        and investigating as many aspects of it as I can whilst still
        trying to keep it from being a five-year project :-)

.. [2]:
        * ManagementController: maintenance requests like /login or 
          /logout and the likes
        * ListingController: answers requests as /articles/ /photoalbums/ 
          and returns a list of webobjects matching that specification 
          (having classnames from my sqlobject's model.py in mind)
        * WebObjectController: answers requests as /Mynewbike, then
          change its type to ReSTArticleController 
          (if webobject.byname(Mynewbike) is of type ReSTArticle
        * 404controller: sees all requests as valid, but returns a 
          404 message (with 'create this page' link)



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
kid-template-discuss mailing list
kid-template-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kid-template-discuss

Reply via email to