django-users@googlegroups.com

10 views
Skip to first unread message

Doang Mawar

unread,
May 3, 2021, 8:20:55 AM5/3/21
to Django users
Hello Django community,

I am faced with some error which is preventing me from proceeding with learning.

File "C:\Users\DoangMawarG\Desktop\mysite\book\Bookbank\urls.py", line 5, in <module>
    path('', views.index, name='index'),
AttributeError: module 'Bookbank.views' has no attribute 'index'

how can i get around this kind of error?

Kasper Laudrup

unread,
May 3, 2021, 8:44:49 AM5/3/21
to django...@googlegroups.com
Hi Doang,

First of all, learn how to use a mailing list/forum like this.

Don't highjack unrelated threads like you've done in addition to writing
this (the "Hiring for frontend developer" thread).

Also, try to give your post a relevant subject (not just
django...@googlegroups.com).

To get to your question, you need to learn how to read error messages
from the python interpreter.

Here it is telling you, that you "views" module doesn't have an "index"
attribute.

What that means is that you most likely have a file called "views.py"
(the module) but there's not a function called "index" there (the
missing attribute).

Look back at your views.py file and at whatever tutorial you are using
for learning and see if that couldn't explain it.

Kind regards,

Kasper Laudrup

OpenPGP_signature
Reply all
Reply to author
Forward
0 new messages