Hi Emil,
On 04/17/2013 04:00 PM, Emil Stenström wrote:
> Carl Meyer skrev 2013-04-17 18:37:
>> Why not instead add a new block to base.html? So you'd change base.html
>> to have:
>>
>> {% block outer-content %}
>> {% block content %}{% endblock content %}
>> {% endblock outer-content %}
>>
>> And base_with_warning.html:
>>
>> {% extends "base.html" %}
>>
>> {% block outer-content %}
>> <div class="warning">...</div>
>> {% block content %}{% endblock content %}
>> {% endblock outer-content %}
>
> Thanks for your reply! This is the same suggestion Jacob suggested one
> minute before you. See my reply to him for my explanations of the
> problems with this solution.
I think you may need to re-read my suggestion more carefully.
This is not the same as your Alternative 1, and your objection does not
apply. Templates inheriting from either base.html or
base_with_warning.html can both override the "content" block, and don't
need to know or care about the "outer-content" block.
Carl
--
You received this message because you are subscribed to the Google Groups
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-developers?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.