python – ImportError: cannot import name patterns no django

Question:

The application in django was working normally until I went to put django-comments, first I installed it with the setup.py that came with it, I believe that's what caused the problem, then I put the project folder together and referenced it in settings.py

So when running the application it is returning:

In line 1: "from django.conf.urls import patterns, include, url"

The error: ImportError: cannot import name patterns

Django v1.10

Python v2.7.9

Answer:

Probably when I built the setup it updated the django version and the version I was using before should be less than 1.8. As of version 1.8 the url is as follows:

https://docs.djangoproject.com/en/dev/topics/http/urls/#example

Scroll to Top
AllEscort