Sunday, March 13, 2016

Re: AttributeError: 'module' object has no attribute 'index'


On Mar 13, 2016 11:42 AM, "kashif Nawaz" <danishn786@gmail.com> wrote:
>
> I read the documentation of Django i followed till page 17 then I have got an error 
> i do exactly the same as the tutorials in docs
> please help me
>

>   File "<frozen importlib._bootstrap>", line 321, in _call_with_frames_removed
>   File "/home/kashif/Desktop/mysite/mysite/polls/urls.py", line 5, in <module>
>     url(r'^$', views.index, name ='index'),
> AttributeError: 'module' object has no attribute 'index'
>
>

What does your urls.py look like? Did you do something like 'import myapp.views'? Do you have a function called index in you views.py?

-James

--
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 post to this group, send email to django-users@googlegroups.com.
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/CA%2Be%2BciXVF0gUjd9S941KWnhjguSnVtANCYUcQxVA-62UDO%2BFvg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment