[Django]-Error when django with rest-framework deployed

4👍

In Django 1.9, url template tag was removed from the future template tag library.

From Django 1.9 release notes:

ssi and url template tags will be removed from the future template tag
library (used during the 1.3/1.4 deprecation period).

So, now you can’t load the url tag from the future library in Django 1.9. You can use the built-in url tag instead.

{% url 'some-url-name' %}

1👍

you can fix that by installing a newer version of djangorestframework

pip install 'djangorestframework>=3.2.3'

i don’t think it’s a good idea to develop on a version of django and deploy on some other version, that’ll most likely give you problems.
i’d work using virtualenv, and saving a requirements.txt file with the version of all the packages you’re using. that way when you deploy you can run:

pip install -r requirements.txt

and that’ll install the same versions as you are using in your dev environment.

hope this helps.
salú

👤rrosa

Leave a comment