On Sun, 2006-10-22 at 05:59 +0000, falcon wrote:
> Is there a function which takes a string representaiton of a url and
> returns the html for that url? (in other words, this function takes a
> url, calls up its corresponding function in views.py, and returns its
> output?)

No.

> 
> I am doing an experiment by writing a sort of "import" tag which will
> take a url as an argument and return the rendered page which can be
> included into a 'master' page.  Similar to the include tag, but it
> doesn't just import the template, it imports and actual html rendered
> by the given url.  As far as I can tell, neither the import tag, nor
> the template heirarchy do exactly what I am trying to accomplish for my
> app.

You will have to implement the logic in
django.handlers.base.BaseHandler.get_response(). The tricky thing will
be that many views rely upon a request object existing and/or middleware
having been run, so setting up the pre-requisites correctly without
ruining your existing environment (session, etc) will require some
awareness of your views' requirements.

(This is probably better suited to django-users, by the way.)

Regards,
Malcolm



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-developers
-~----------~----~----~----~------~----~------~--~---

Reply via email to