Search code examples
djangodjango-rest-frameworkdjango-urlsdeprecateddjango-1.8

Django giving a warning when I use "url" tag from future. Suggests I use "default url tag" instead. What is the "default url tag"?


I'm using Django 1.8 and Django Rest Framework. When I log a user out using the Django Rest Framework

/api-auth/logout

url (read more about it here: http://www.django-rest-framework.org/tutorial/4-authentication-and-permissions/#adding-login-to-the-browsable-api) I notice that in my terminal where I ran

python manage.py runserver

it says:

lib/python3.4/site-packages/django/templatetags/future.py:25: RemovedInDjango19Warning: Loading the `url` tag from the `future` library is deprecated and will be removed in Django 1.9. Use the default `url` tag instead.

RemovedInDjango19Warning)

What is the "default 'url' tag"? And where exactly am I using the "'url' tag from the 'future' library"?


Solution

  • The "future" has come and gone for the URL tag. Importing it from "future" was to allow people on pre-1.5 versions to use the 1.5+ syntax. Since that's now three versions ago, you should just use the tag, without importing it from future.