#3753: Allow TEMPLATE_STRING_IF_INVALID to contain a placeholder for the missing
variable's name
-----------------------------------------------------------+----------------
Reporter: Matt McClanahan <[EMAIL PROTECTED]> |
Owner: adrian
Status: new |
Component: Template system
Version: SVN |
Resolution:
Keywords: Template, debug, TEMPLATE_STRING_IF_INVALID |
Stage: Ready for checkin
Has_patch: 1 |
Needs_docs: 0
Needs_tests: 0 |
Needs_better_patch: 0
-----------------------------------------------------------+----------------
Comment (by mtredinnick):
For future reference: you should not access {{{settings.*}}} in code that
is executed at import time. Doing so means that you cannot import the
module in question without haing already configured settings, which
requires messy code design in the manually-configured settings case. We
should allow people to follow PEP-8 formatted code practices: all imports
first, then execute whataver is required (settings configuration, if
needed).
I've altered the patch slightly so that settings are only accessed when
required (inside Template methods).
--
Ticket URL: <http://code.djangoproject.com/ticket/3753#comment:5>
Django Code <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
-~----------~----~----~----~------~----~------~--~---