[Django] #24666: Ability to specify an alias for TemplateEngine in settings

14 views
Skip to first unread message

Django

unread,
Apr 20, 2015, 5:51:31 AM4/20/15
to django-...@googlegroups.com
#24666: Ability to specify an alias for TemplateEngine in settings
---------------------------------+----------------------
Reporter: kwist | Owner: nobody
Type: New feature | Status: new
Component: Template system | Version: 1.8
Severity: Normal | Keywords: Template
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+----------------------
use e.g.
{{{
#!div style="font-size: 80%"
Code highlighting:
{{{#!python
default_name = tpl.get('ALIAS', tpl['BACKEND'].rsplit('.', 2)[-2])
}}}
}}}

instead
{{{
#!div style="font-size: 80%"
Code highlighting:
{{{#!python
default_name = tpl['BACKEND'].rsplit('.', 2)[-2]
}}}
}}}

I have a backend "service.core.jinja2.engine.Jinja2" and current code
returns "'''engine'''" as default_name for this name

--
Ticket URL: <https://code.djangoproject.com/ticket/24666>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Apr 20, 2015, 9:38:57 AM4/20/15
to django-...@googlegroups.com
#24666: Ability to specify an alias for TemplateEngine in settings
---------------------------------+--------------------------------------

Reporter: kwist | Owner: nobody
Type: New feature | Status: new
Component: Template system | Version: 1.8
Severity: Normal | Resolution:

Keywords: Template | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
---------------------------------+--------------------------------------
Changes (by timgraham):

* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0


Comment:

How is your proposal different from setting the
[https://docs.djangoproject.com/en/1.8/ref/settings/#std:setting-
TEMPLATES-NAME 'NAME'] option?

--
Ticket URL: <https://code.djangoproject.com/ticket/24666#comment:1>

Django

unread,
Apr 21, 2015, 6:55:33 AM4/21/15
to django-...@googlegroups.com
#24666: Ability to specify an alias for TemplateEngine in settings
---------------------------------+--------------------------------------
Reporter: kwist | Owner: nobody
Type: New feature | Status: closed

Component: Template system | Version: 1.8
Severity: Normal | Resolution: invalid

Keywords: Template | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
---------------------------------+--------------------------------------
Changes (by kwist):

* status: new => closed
* resolution: => invalid


--
Ticket URL: <https://code.djangoproject.com/ticket/24666#comment:2>

Reply all
Reply to author
Forward
0 new messages