[Answer]-Module has no attribute 'index'?

1👍

Make sure the file is named as polls/urls.py, in your comment you forget the ‘s’ which looks as if you may have the file name saved wrong. This will have an effect as the last line of code relies on ‘polls.urls’

The django tutorials are pretty poor when it comes to replacing previous code written and knowing when to delete previous code. Go back and check through the previous tutorials, django says ‘update’ or ‘add’ and you may end up deleting code instead of just adding to it like I unfortunately did.

I am no expert, but i have just been through the tutorials and suffered a huge amount of obstacles, of which i managed to overcome. Good luck

👤DBull

0👍

Index variable ise not defined under views. In polls/url.py use this code:
“path(”, views.home, name=’home’)”

Try using home instead of index

Leave a comment