Thursday, April 22, 2021

Re: AttributeError: module 'polls.views' has no attribute 'index'

On Mon, Apr 19, 2021 at 2:07 AM Avi Mehenwal <avi.mehanwal@gmail.com> wrote:
I followed the same tutorial on 17th April 2021 with Python 3.9.2 and Django     3.2 and have exactly the same problems as mentioned above.

    path('', views.index, name='index'),
AttributeError: module 'polls.views' has no attribute 'index'

any help on how can I debug this? I am a django noob

We all started out that way.

From the error message, assuming views it is defined as:

from . import views

or, maybe

from polls import views

it means that python cannot find the function index() in the views module.
 
Regards

--
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 view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAE5VhgUckZZtR%2BVBmW6ungOQ8uBowyE%2BSLG%3DVg%3DuqZVZmw275w%40mail.gmail.com.

No comments:

Post a Comment