ImportError: cannot import name 'path'


#1

Hi I’m using the kickstarter book, version published on 2018-04-15

I’d like to check this is the most upto date version of the book as I encountered this issue but found a workaround.
issue:
from django.conf.urls import path ImportError: cannot import name 'path'

I’m currently following under adding to urls.py section in the book.

The book suggests from django.conf.urls import path

But causes the error cannot import name 'path' when trying to run python3 manage.py runserver.

changing the suggested text to django.urls import include, path
for the urls.py file solves the issue.

Hope this helps anyone else.

reference: https://docs.djangoproject.com/en/2.0/ref/urls/#path


#2

Oh fun, I love typos! I’ll fix that up, thanks for reporting. :)