mirror of
https://github.com/django/django.git
synced 2025-07-04 09:49:12 +00:00
new_admin: merged to trunk r1385
git-svn-id: http://code.djangoproject.com/svn/django/branches/new-admin@1386 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
commit
d953d9ba5b
@ -10,9 +10,10 @@ from os.path import dirname, join as pathjoin
|
|||||||
HIDDEN_SETTINGS = re.compile('SECRET|PASSWORD')
|
HIDDEN_SETTINGS = re.compile('SECRET|PASSWORD')
|
||||||
|
|
||||||
def linebreak_iter(template_source):
|
def linebreak_iter(template_source):
|
||||||
newline_re = re.compile("^", re.M)
|
p = template_source.find('\n')
|
||||||
for match in newline_re.finditer(template_source):
|
while p >= 0:
|
||||||
yield match.start()
|
yield p
|
||||||
|
p = template_source.find('\n', p+1)
|
||||||
yield len(template_source) + 1
|
yield len(template_source) + 1
|
||||||
|
|
||||||
def get_template_exception_info(exc_type, exc_value, tb):
|
def get_template_exception_info(exc_type, exc_value, tb):
|
||||||
@ -520,4 +521,4 @@ TECHNICAL_404_TEMPLATE = """
|
|||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
"""
|
"""
|
||||||
|
@ -549,6 +549,23 @@ The ID, as an integer, of the current site in the ``sites`` database. This is
|
|||||||
used so that application data can hook into specific site(s) and a single
|
used so that application data can hook into specific site(s) and a single
|
||||||
database can manage content for multiple sites.
|
database can manage content for multiple sites.
|
||||||
|
|
||||||
|
TEMPLATE_DEBUG
|
||||||
|
--------------
|
||||||
|
|
||||||
|
Default: ``False``
|
||||||
|
|
||||||
|
**Only available in Django development version.**
|
||||||
|
|
||||||
|
A boolean that turns on/off template debug mode. If this is ``True``, the fancy
|
||||||
|
error page will display a detailed report for any ``TemplateSyntaxError``. This
|
||||||
|
report contains the relevant snippet of the template, with the appropriate line
|
||||||
|
highlighted.
|
||||||
|
|
||||||
|
Note that Django only displays fancy error pages if ``DEBUG`` is ``True``, so you'll
|
||||||
|
want to set that to take advantage of this setting.
|
||||||
|
|
||||||
|
See also DEBUG.
|
||||||
|
|
||||||
TEMPLATE_DIRS
|
TEMPLATE_DIRS
|
||||||
-------------
|
-------------
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user