On Thu, Oct 30, 2008 at 4:08 PM, bruno desthuilliers
<[EMAIL PROTECTED]> wrote:
> rendering, based on request informations. The points I'm yet really
> happy with are:
> - how to tell the rendering decorator what we want to render
> - how to avoid template duplication for 'full' rendering and 'partial'
> rendering
>
> wrt/ first point, the simplest solution IMHO is to pass a render=json
> or render=partial argument in the query string (default being
> rendering the 'full' page). My main problem is with second point. I
> have a working scheme using two templates, the 'full' one doing an
> include of the 'partial' one. This should work, but I still don't like
> having two distinct templates.
I'd need to check Django's template code to see if this is possible,
but one possibility is to give the decoration a "block" parameter, to
render a specific block from a template. So you could have something
like:
@render_view('js', 'template.html', block='js_block')
def view:
pass
--
---
David Zhou
[EMAIL PROTECTED]
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" 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-users?hl=en
-~----------~----~----~----~------~----~------~--~---