Commit 5d863f1f authored by Adrian Holovaty's avatar Adrian Holovaty
Browse files

Fixed #603 -- Added template debugging errors to pretty error-page output, if...

Fixed #603 -- Added template debugging errors to pretty error-page output, if TEMPLATE_DEBUG setting is True. Also refactored FilterParser for a significant speed increase and changed the template_loader interface so that it returns information about the loader. Taken from new-admin. Thanks rjwittams and crew

git-svn-id: http://code.djangoproject.com/svn/django/trunk@1379 bcc190cf-cafb-0310-a4f2-bffc1f526a37
parent cfc5786d
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -8,6 +8,7 @@ from django.utils.translation import gettext_lazy as _
####################

DEBUG = False
TEMPLATE_DEBUG = False

# Whether to use the "Etag" header. This saves bandwidth but slows down performance.
USE_ETAGS = False
+1 −0
Original line number Diff line number Diff line
# Django settings for {{ project_name }} project.

DEBUG = True
TEMPLATE_DEBUG = DEBUG

ADMINS = (
    # ('Your Name', 'your_email@domain.com'),
+292 −194

File changed.

Preview size limit exceeded, changes collapsed.

+3 −2
Original line number Diff line number Diff line
@@ -192,6 +192,7 @@ class RegroupNode(Node):
        for obj in obj_list:
            grouper = resolve_variable_with_filters('var.%s' % self.expression, \
                Context({'var': obj}))
            # TODO: Is this a sensible way to determine equality?
            if output and repr(output[-1]['grouper']) == repr(grouper):
                output[-1]['list'].append(obj)
            else:
@@ -628,8 +629,8 @@ def do_load(parser, token):
    # check at compile time that the module can be imported
    try:
        LoadNode.load_taglib(taglib)
    except ImportError:
        raise TemplateSyntaxError, "'%s' is not a valid tag library" % taglib
    except ImportError, e:
        raise TemplateSyntaxError, "'%s' is not a valid tag library: %s" % (taglib, e)
    return LoadNode(taglib)

def do_now(parser, token):
+38 −9

File changed.

Preview size limit exceeded, changes collapsed.

Loading