Changeset 6974
- Timestamp:
- 12/22/07 13:30:13 (1 year ago)
- Files:
-
- django/trunk/django/template/__init__.py (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/trunk/django/template/__init__.py
r6973 r6974 155 155 class Template(object): 156 156 def __init__(self, template_string, origin=None, name='<Unknown Template>'): 157 "Compilation stage"158 157 try: 159 158 template_string = smart_unicode(template_string) … … 187 186 class Token(object): 188 187 def __init__(self, token_type, contents): 189 "The token_type must be TOKEN_TEXT, TOKEN_VAR, TOKEN_BLOCK or TOKEN_COMMENT"188 # token_type must be TOKEN_TEXT, TOKEN_VAR, TOKEN_BLOCK or TOKEN_COMMENT. 190 189 self.token_type, self.contents = token_type, contents 191 190 … … 204 203 205 204 def tokenize(self): 206 "Return a list of tokens from a given template_string "205 "Return a list of tokens from a given template_string." 207 206 in_tag = False 208 207 result = [] … … 299 298 pass 300 299 301 def error(self, token, msg ):300 def error(self, token, msg): 302 301 return TemplateSyntaxError(msg) 303 302
