I can't start a Django blog on the server.
inna last edited by
The following mistake is made:
File "/root/pyserver/news/news/urls.py", line 1, in <module> from django.conf.urls import patterns, url, include ImportError: cannot import name patterns
Not on the server at the localhost, it's all good.
irl last edited by
Official https://docs.djangoproject.com/en/1.10/ref/urls/ Django is a warning.
Deprecated since version 1.8: urlpatterns should be a plain list of django.conf.urls.url() instances instead.
So correct your urls - now they have to look like this.
from django.conf.urls import patterns, url
urlpatterns = [
By the word, automatic imports through the line are also removed. Now, I'm gonna have to write it out.
from news.views import year_archive