On Sun, Apr 5, 2009 at 3:28 PM, atik <atik.b...@gmail.com> wrote: > > > here is my urls.py file- > > from django.conf.urls.defaults import * > > urlpatterns = patterns('', > (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'), > ) > > > # Uncomment the next two lines to enable the admin: > from django.contrib import admin > admin.autodiscover() > > #urlpatterns = patterns('', > # Example: > # (r'^mysite/', include('mysite.foo.urls')), > > # Uncomment the admin/doc line below and add > 'django.contrib.admindocs' > # to INSTALLED_APPS to enable admin documentation: > # (r'^admin/doc/', include('django.contrib.admindocs.urls')), > > # Uncomment the next line to enable the admin: > (r'^admin/(.*)', admin.site.root), > ) > > > > What you want to do is combine these into one urlpattern:
from django.conf.urls.defaults import * from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', (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'), (r'^admin/(.*)', admin.site.root), ) Would be the end result. Alex -- "I disapprove of what you say, but I will defend to the death your right to say it." --Voltaire "The people's good is the highest law."--Cicero --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---