You need to follow the CORRECT tutorial:

https://docs.djangoproject.com/en/1.11/

In the urls.py file, instead of:

from django.contrib import adminfrom 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, urlfrom 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 (<[email protected]>)
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.
>
> Fidel Leon
> [email protected]
> Phone: +34 622 26 44 92 <//+34%20622%2026%2044%2092>
> GPG: 2585 30C2 E3C7 7151 0864  946B 7423 F94B 5753 5FC7
>
> El 17 de mayo de 2018 a las 20:56:56, Tristan Demot (
> [email protected]) escribió:
>
> Hello,
>
>  I use docs.djangoproject.co/en/2.0
>  Python 2 7 13
> Gjango 1.11.13
>
> Creating the Polls app OK
> Write your first view OK
> But python manage runserver don't work
> With : python -Wall manage.py test
> ImportError : cannot import name include
> If you want to see something, ask me
> Many 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 [email protected].
> To post to this group, send email to [email protected].
> 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
> <https://groups.google.com/d/msgid/django-users/1fe7df04-dc85-4a3d-940e-4dde7de31477%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> 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 [email protected].
> To post to this group, send email to [email protected].
> 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
> <https://groups.google.com/d/msgid/django-users/CAHXg%3DN090U8JCFfdvZJWH1qSoWQgp2mQH6z2RfCzj3384epQKQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
>
> --
>


-- 
Fidel Leon
[email protected]
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 [email protected].
To post to this group, send email to [email protected].
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.

Reply via email to