1
0
mirror of https://github.com/django/django.git synced 2025-10-25 06:36:07 +00:00

Removed debug cruft

git-svn-id: http://code.djangoproject.com/svn/django/branches/new-admin@882 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Robert Wittams
2005-10-15 23:12:27 +00:00
parent e84be6ffa3
commit afda16b5ab
2 changed files with 1 additions and 12 deletions

View File

@@ -238,7 +238,6 @@ class DebugLexer(Lexer):
for match in tag_re.finditer(self.template_string): for match in tag_re.finditer(self.template_string):
start, end = match.span() start, end = match.span()
#print "%d:%d --- %s " % (start, end, self.template_string[start:end] )
if start > upto: if start > upto:
token_tups.append( (self.template_string[upto:start], line) ) token_tups.append( (self.template_string[upto:start], line) )
upto = start upto = start
@@ -274,11 +273,10 @@ class DebugLexer(Lexer):
token.source = source token.source = source
return token return token
from pprint import pformat
class Parser(object): class Parser(object):
def __init__(self, tokens): def __init__(self, tokens):
self.tokens = tokens self.tokens = tokens
#print pformat(self.tokens)
def parse(self, parse_until=[]): def parse(self, parse_until=[]):
nodelist = NodeList() nodelist = NodeList()
@@ -313,9 +311,6 @@ class Parser(object):
if parse_until: if parse_until:
self.unclosed_block_tag(token, parse_until) self.unclosed_block_tag(token, parse_until)
#print "-------------------------------"
#print pformat(nodelist)
#print "------------------------------"
return nodelist return nodelist
def extend_nodelist(self, nodelist, node, token): def extend_nodelist(self, nodelist, node, token):

View File

@@ -217,12 +217,6 @@ TEMPLATE_TESTS = {
'exception04': ("{% extends 'inheritance17' %}{% block first %}{% echo 400 %}5678{% endblock %}", {}, template.TemplateSyntaxError), 'exception04': ("{% extends 'inheritance17' %}{% block first %}{% echo 400 %}5678{% endblock %}", {}, template.TemplateSyntaxError),
} }
def cutdown(name):
global TEMPLATE_TESTS
TEMPLATE_TESTS = dict([ (name, TEMPLATE_TESTS[name])])
print repr(TEMPLATE_TESTS[name])
#cutdown('basic-syntax04')
# This replaces the standard template loader. # This replaces the standard template loader.
def test_template_loader(template_name, template_dirs=None): def test_template_loader(template_name, template_dirs=None):