urlconf

How to get the current urlname using Django?

I have to build an url dynamically according to the current url. Using the {% url %} tag is the easiest way to do it, but I need the current url name to generate the new one dynamically. How can I get the url name attached to the urlconf that leads to the current view? EDIT : I know I can manually handcraft the url using get_absolute_...

Django "Page not found" error page shows only one of two expected urls

I'm working with Django, admittedly for the first time doing anything real. The URL config looks like the following: urlpatterns = patterns('my_site.core_prototype.views', (r'^newpost/$', 'newPost'), (r'^$', 'NewPostAndDisplayList'), # capture nothing... #more here... - perhaps the perma-links? ) This is in an app's ...

Reg Ex Django Url Conf

These is my django URLconf: urlpatterns = patterns('', ('^hello/$', hello), (r'^polls/$', 'mysite.polls.views.index'), (r'^polls/(?P<poll_id>\d+)/$', 'mysite.polls.views.detail'), (r'^polls/(?P<poll_id>\d+)/results/$', 'mysite.polls.views.results'), (r'^polls/(?P<poll_id>\d+)/vote/$', 'mysite.polls.views.vote'), ...