Reputation: 14144
I have a PY file with code:
class URLSystemNode(URLNode):
...
def render(self, context):
...
if not self.legacy_view_name:
view_name = view_name.resolve(context)
...
...
def url_system(parser, token):
...
return URLSystemNode(view_name, args, kwargs, asvar, legacy_view_name=True)
This worked fine in Django 1.4.5. After I've migrated to Django 1.6.5 I am receiving an error:
__init__() got an unexpected keyword argument 'legacy_view_name'
The line that causing this is:
return URLSystemNode(view_name, args, kwargs, asvar, legacy_view_name=True)
Question: may be someone can help me find out why there is an error in Django 1.6.5?
The URLSystemNode
doesn't have the __init__
function. May be it is mandatory for Django 1.6.5?
Upvotes: 0
Views: 343
Reputation: 599628
legacy_view_name
was an argument that was introduced to deal with the move from the old {% url view_name %}
syntax to the new {% url 'view_name' %}
. Since the latter is now the only accepted syntax, the argument has been dropped. Just remove it from that line altogether.
Upvotes: 4