#21313: load tag before extends
-------------------------------+--------------------------------------
Reporter: ztorstri@… | Owner: nobody
Type: New feature | Status: new
Component: Uncategorized | Version: 1.5
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------
Comment (by ztorstri@…):
Replying to [comment:2 chrismedrela]:
> What's wrong about putting ``BASE_TEMPLATE_NAME`` into
``RequestContext``? This variable doesn't seem to be secret so you don't
need to hide it from other templates.
>
> Anyway, I'm -1 on emulating 'private' variables (variables visible only
in a specific template) using template tags.
It's not about being private, it's about being wasteful. There's no reason
to load the variable in templates that don't relate to the app.
I ended up writing a mixin that defines get_context and I inherit it in
the views that need the base template. It was a satisfactory solution,
but I still think it's worth considering allowing template tags to be
loaded before extends.
--
Ticket URL: <https://code.djangoproject.com/ticket/21313#comment:3>
Django <https://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 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].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/076.fdd737b668f368262dc1b2541d633b3c%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.