You need to follow the CORRECT tutorial:
--
-- In the urls.py file, instead of:
from django.contrib import admin from django.urls import include, path urlpatterns = [ path('polls/', include('polls.urls')), path('admin/', admin.site.urls), ]
you need this:
from django.conf.urls import include, url from django.contrib import admin urlpatterns = [ url(r'^polls/', include('polls.urls')), url(r'^admin/', admin.site.urls), ]Please note the django.conf.urls INSTEAD of django.contrib
El vie., 18 may. 2018 a las 16:20, Journal-Immo (<contact@journal-immo.com>) escribió:
Thank
But (I use debian 9)
Apt-get update
Apt-get install python python3 python-django
django-admin --version 1.11.13
Where is the problem ?
Le 17/05/2018 à 21:01, Fidel Leon a écrit :
You are using the wrong combination of Django and tutorial: "include" is available in Django 2 and up, but you're using Django 1.11.
El 17 de mayo de 2018 a las 20:56:56, Tristan Demot (contact@journal-immo.com) escribió:
----Hello,
Python 2 7 13Gjango 1.11.13
Creating the Polls app OK
Write your first view OK
But python manage runserver don't workWith : python -Wall manage.py testImportError : cannot import name includeIf you want to see something, ask meMany thanks
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/1fe7df04-dc85-4a3d-940e-4dde7de31477%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAHXg%3DN090U8JCFfdvZJWH1qSoWQgp2mQH6z2RfCzj3384epQKQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
Fidel Leon
Phone: +34 622 26 44 92
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAHXg%3DN3nMbGtHLjQO2WoJgr8rjFwO7L5Sm-MRduf4yEPpfH7EA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment