Hello!

sebey wrote:
> on the index page I get this:
>
> Page not found (404)
> Request Method:       GET
> Request URL:  http://localhost:8000/
>
> Using the URLconf defined in ubertester.urls, Django tried these URL
> patterns, in this order:
>
>    1. ^admin/
>    2. ^polls/$
>    3. ^polls/(?P<poll_id>\d+)/$
>    4. ^polls/(?P<poll_id>\d+)/results/$
>    5. ^polls/(?P<poll_id>\d+)/vote/$
>
> The current URL, /, didn't match any of these.
>
>   
This is correct. You don't have any views defined for / in your urls.py,
so of course it returns a 404.
> then on the /polls view I get this
>
> ViewDoesNotExist at /polls/
> Could not import mysite.polls.views. Error was: No module named
> mysite.polls.views
> Request Method:       GET
> Request URL:  http://localhost:8000/polls/
> Exception Type:       ViewDoesNotExist
> Exception Value:      Could not import mysite.polls.views. Error was: No
> module named mysite.polls.views
> Exception Location:   /Library/Frameworks/Python.framework/Versions/2.5/
> lib/python2.5/site-packages/django/core/urlresolvers.py in
> _get_callback, line 127
>   
<snip>
> what is going on?
>   
The error message says that the mysite.polls.views module doesn't exist.
Do you have views.py in your polls directory?

Your file tree should look something like this:

mysite/
mysite/settings.py
mysite/urls.py
mysite/polls/
mysite/polls/models.py
mysite/polls/views.py

The last line is the one to pay attention to. If you don't have the
views.py in the right place, then it won't find it, and it will produce
the error that you pasted.

Hopefully this is helpful!

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to