Django

Code

Changeset 1386

Show
Ignore:
Timestamp:
11/23/05 18:35:49 (3 years ago)
Author:
hugo
Message:

new_admin: merged to trunk r1385

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/branches/new-admin/django/views/debug.py

    r1382 r1386  
    1111 
    1212def linebreak_iter(template_source): 
    13     newline_re = re.compile("^", re.M) 
    14     for match in newline_re.finditer(template_source): 
    15         yield match.start() 
     13    p = template_source.find('\n') 
     14    while p >= 0: 
     15        yield p 
     16        p = template_source.find('\n', p+1) 
    1617    yield len(template_source) + 1 
    1718 
  • django/branches/new-admin/docs/settings.txt

    r1321 r1386  
    550550database can manage content for multiple sites. 
    551551 
     552TEMPLATE_DEBUG 
     553-------------- 
     554 
     555Default: ``False`` 
     556 
     557**Only available in Django development version.** 
     558 
     559A boolean that turns on/off template debug mode. If this is ``True``, the fancy 
     560error page will display a detailed report for any ``TemplateSyntaxError``. This 
     561report contains the relevant snippet of the template, with the appropriate line 
     562highlighted. 
     563 
     564Note that Django only displays fancy error pages if ``DEBUG`` is ``True``, so you'll 
     565want to set that to take advantage of this setting. 
     566 
     567See also DEBUG. 
     568 
    552569TEMPLATE_DIRS 
    553570-------------