1
0
mirror of https://github.com/django/django.git synced 2025-10-31 01:25:32 +00:00

More attacking E302 violators

This commit is contained in:
Alex Gaynor
2013-11-02 13:12:09 -07:00
parent 65c4ac3b24
commit 7548aa8ffd
150 changed files with 433 additions and 1 deletions

View File

@@ -71,15 +71,19 @@ builtins = []
# uninitialised.
invalid_var_format_string = None
class TemplateSyntaxError(Exception):
pass
class TemplateDoesNotExist(Exception):
pass
class TemplateEncodingError(Exception):
pass
@python_2_unicode_compatible
class VariableDoesNotExist(Exception):

View File

@@ -8,6 +8,7 @@ _standard_context_processors = None
# this to human error or failure to read migration instructions.
_builtin_context_processors = ('django.core.context_processors.csrf',)
class ContextPopException(Exception):
"pop() has been called more times than push()"
pass

View File

@@ -30,6 +30,7 @@ class DebugLexer(Lexer):
token.source = self.origin, source
return token
class DebugParser(Parser):
def __init__(self, lexer):
super(DebugParser, self).__init__(lexer)
@@ -72,6 +73,7 @@ class DebugParser(Parser):
if not hasattr(e, 'django_template_source'):
e.django_template_source = token.source
class DebugNodeList(NodeList):
def render_node(self, node, context):
try:

View File

@@ -24,6 +24,7 @@ from django.utils.text import normalize_newlines
register = Library()
#######################
# STRING DECORATOR #
#######################

View File

@@ -2,6 +2,7 @@
Parser and utilities for the smart 'if' tag
"""
# Using a simple top down parser, as described here:
# http://effbot.org/zone/simple-top-down-parsing.htm.
# 'led' = left denotation