I'm trying to set up a template for all my forms, but I'm having
trouble using the {% with %} block:

{% extends "base_form.html" %}
{% with form.instance as object %}

{% block title%}
    {{object.title}} <- not displayed :(
{% endblock %}

{% block body %}
{% with form.instance as object %}
    {{object.title}} <- now it is displayed
{% endwith%}
{% endblock %}

{% endwith %}

The 'with' tag works, but only within other blocks. Is there any way
to get around this without wrapping a hundred 'with' blocks around
each block in my template?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to