load tag before extends
|Reported by:||ztorstri@…||Owned by:||nobody|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
I'd like to be able to load a template tag before extends. I don't want to use a context processor because I don't want every view that uses RequestContext to get the variable. Here's the detailed situation:
I'm designing an app, and I want the "base.html" template to be a configurable in the settings file. So a user downloads my application, goes to the settings file, adds the setting "BASE_TEMPLATE_NAME=somestring", and then all of my templates automatically inherit this base template.
If I use a context processor, then every other page on their site that uses RequestContext will get this variable as well. I tried to use a template tag to return the base template setting, but I can't put anything before extends.
Change History (4)
comment:1 Changed 3 years ago by ztorstri@…
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset