I've read the doc several times but am still confused by the way
Django references URLs. I'm running Python 2.4 and Django 1.0.2 on my
Debian Etch box.
My urls.py reads:
from django.conf.urls.defaults import *
from django.conf import settings
urlpatterns = patterns('my_proj.my_app.views',
(r'^admin/', include('django.contrib.admin.urls')),
(r'^my_app/$', 'index'),
(r'^my_app/home/$', 'index'),
(r'^my_app/page1/$', 'page1'),
(r'^my_app/page1/response/$', 'response'),
(r'^my_app/page2/$', 'page2'),
(r'^my_app/accounts/', include('registration.urls')),
)
And I have the following line in the resp() function of views.py:
return HttpResponseRedirect(reverse
('my_proj.my_app.views.response', args=(request,)))
This line is causing the following error:
Request Method: POST
Request URL: http://localhost:8000/my_app/page1/resp/
Exception Type: ViewDoesNotExist
Exception Value: Tried page2 in module my_proj.my_app.views.
Error was: 'module' object has no attribute 'page2'
Shouldn't the reverse() call resolve to "http://localhost:8000/my_app/
page1/response/"?
Any help or suggestions for further research would be appreciated.
Thanks,
Tim
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---