On 12/5/05, Medium <[EMAIL PROTECTED]> wrote:

Are you guys looking for portal or portlet like functionality ? From
what I have seen, neither django or any other python web framework
currently supports such a component style of web programming. You would
need to handle the model repeatedly in your views or in some sort of
dynamic fashion, else use something like cheetah where you can load
models directly from the the template. Have a super template which can
dynamically include other templates whose names are passed in as part of
the model and then loaded dynamically. Sounds very messy and probably
not a great idea but that's all I can think of.

It does not have to be this complicated. Proposal:

A tag called "render".

<% render partialURL %>

view: its partial URL enough to resolve to actual view following the URLConf.

This tag will following the whole django request processing, but without making a HTTP request, and return the content generated by the view. render tag can access request from the DjangoContext and view would be executed in the same context, so cookies, session data and everything else will be inherited by the view.

For completeness, render tag may take full urls and include external pages at the current location.

Repeatedly using the request object from different views may have some side effects, but just knowing that may be enough to stop it from hurting developers in any significant manner I guess.

--
Amit Upadhyay
Blog: http://www.rootshell.be/~upadhyay
+91-9867-359-701

Reply via email to