Browse files

Simplified URLConfs.

  • Loading branch information...
1 parent 8a5218a commit 92694a0d429a315c52af7fa5b665891cdb2a8f77 @YAmikep committed Mar 26, 2012
Showing with 24 additions and 13 deletions.
  1. +24 −13 mysite/mysite/urls.py
View
37 mysite/mysite/urls.py
@@ -4,19 +4,30 @@
from django.contrib import admin
admin.autodiscover()
-urlpatterns = patterns('',
- # Examples:
- # url(r'^$', 'mysite.views.home', name='home'),
- # url(r'^mysite/', include('mysite.foo.urls')),
-
- # Uncomment the admin/doc line below to enable admin documentation:
- # url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
+urlpatterns = patterns('polls.views',
+ url(r'^polls/$', 'index'),
+ url(r'^polls/(?P<poll_id>\d+)/$', 'detail'),
+ url(r'^polls/(?P<poll_id>\d+)/results/$', 'results'),
+ url(r'^polls/(?P<poll_id>\d+)/vote/$', 'vote'),
+)
- url(r'^polls/$', 'polls.views.index'),
- url(r'^polls/(?P<poll_id>\d+)/$', 'polls.views.detail'),
- url(r'^polls/(?P<poll_id>\d+)/results/$', 'polls.views.results'),
- url(r'^polls/(?P<poll_id>\d+)/vote/$', 'polls.views.vote'),
-
- # Uncomment the next line to enable the admin:
+urlpatterns += patterns('',
url(r'^admin/', include(admin.site.urls)),
)
+
+# urlpatterns = patterns('',
+# # Examples:
+# # url(r'^$', 'mysite.views.home', name='home'),
+# # url(r'^mysite/', include('mysite.foo.urls')),
+
+# # Uncomment the admin/doc line below to enable admin documentation:
+# # url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
+
+# url(r'^polls/$', 'polls.views.index'),
+# url(r'^polls/(?P<poll_id>\d+)/$', 'polls.views.detail'),
+# url(r'^polls/(?P<poll_id>\d+)/results/$', 'polls.views.results'),
+# url(r'^polls/(?P<poll_id>\d+)/vote/$', 'polls.views.vote'),
+
+# # Uncomment the next line to enable the admin:
+# url(r'^admin/', include(admin.site.urls)),
+# )

0 comments on commit 92694a0

Please sign in to comment.