from django.conf.urls import patterns, url

from apps.polls import views

urlpatterns = patterns('',
	# ex: /polls/
		url(r'^$', views.index, name='index'),
	# ex: /polls/5
		url(r'^(?P<poll_id>\d+)/$', views.detail, name='detail'),
	# ex: /polls/5/results/
		url(r'^(?P<poll_id>\d+)/results/$', views.results, name='results'),
	# ex: /polls/5/vote/
		url(r'^(?P<poll_id>\d+)/vote/$', views.vote, name='vote'),
	)
@@ -128,21 +128,35 @@
 , views.
-i
+I
 ndex
+View.as_view()
 , name='
@@ -216,22 +216,36 @@
 , views.
-d
+D
 etail
+View.as_view()
 , name='
@@ -323,23 +323,22 @@
 , views.
-results
+detail
 , name='

Use generic views: Less code is better