#10003: if and extends in template
-----------------------------+----------------------------------------------
Reporter: 0ptr | Owner: nobody
Status: new | Milestone:
Component: Template system | Version: 1.0
Keywords: | Stage: Unreviewed
Has_patch: 0 |
-----------------------------+----------------------------------------------
{{{
{% if mobile %}
{% extends 'base_mobile.html' %}
{% else %}
{% extends 'base_normal.html' %}
{% endif %}
}}}
Throws following exception:
{{{
Exception Type: TemplateSyntaxError
Exception Value:
Invalid block tag: 'else'
Exception Location: /home/dsduser/django-
synble/django/template/__init__.py in invalid_block_tag, line 333
}}}
I think this should be supported. Second option is to write include
correctly so that include does not broke inheritance. E.g.:
basbase.html: has block
base.html: include "basebase.html"
logic.html: extends "base.html", inheritance of basbase.html block does
not work here anymore.
--
Ticket URL: <http://code.djangoproject.com/ticket/10003>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" 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-updates?hl=en
-~----------~----~----~----~------~----~------~--~---