Subclassed template.Node instead of Node for consistency.

This commit is contained in:
Nik Nyby 2015-02-09 22:03:29 -05:00 committed by Tim Graham
parent 0f7f5bc9e7
commit 34ccb3cc03
1 changed files with 1 additions and 2 deletions

View File

@ -1,5 +1,4 @@
from django import template from django import template
from django.template.base import Node
from django.utils.encoding import iri_to_uri from django.utils.encoding import iri_to_uri
from django.utils.six.moves.urllib.parse import urljoin from django.utils.six.moves.urllib.parse import urljoin
@ -90,7 +89,7 @@ def get_media_prefix(parser, token):
return PrefixNode.handle_token(parser, token, "MEDIA_URL") return PrefixNode.handle_token(parser, token, "MEDIA_URL")
class StaticNode(Node): class StaticNode(template.Node):
def __init__(self, varname=None, path=None): def __init__(self, varname=None, path=None):
if path is None: if path is None:
raise template.TemplateSyntaxError( raise template.TemplateSyntaxError(