Yes, in tutorial it is said to be done so. I expect it works as follows,
after the commented lines.
urlpatterns = patterns('',
    url(r'^$',
        ListView.as_view(
            queryset=Poll.objects.order_by('-pub_date')[:5],
            context_object_name='latest_poll_list',
            template_name='polls/index.html')),
    url(r'^(?P<pk>\d+)/$',
        DetailView.as_view(
            model=Poll,
            template_name='polls/detail.html')),
    url(r'^(?P<pk>\d+)/results/$',
        DetailView.as_view(
            model=Poll,
            template_name='polls/results.html'),
        name='poll_results'),
    url(r'^(?P<poll_id>\d+)/vote/$', 'polls.views.vote'),
)
urlpatterns += patterns('',
    url(r'^admin/', include(admin.site.urls)),

2012/7/8 Mario Gudelj <mario.gud...@gmail.com>

> But you've commented out all your URLs that start with /polls/, like 
> url(r'^polls/$',
> 'index')... r'^polls/$' will resolve to http://127.0.0.1:8000/polls/, for
> example.
>
> -m
>
>
> On 8 July 2012 23:01, Seyfullah Tıkıç <sti...@gmail.com> wrote:
>
>> http://127.0.0.1:8000/polls/34/
>> http://127.0.0.1:8000/polls/
>> http://127.0.0.1:8000/polls/34/results/
>> 2012/7/8 Mario Gudelj <mario.gud...@gmail.com>
>>
>>>  Which url are you trying to access when you get that 404?
>>> On Jul 8, 2012 5:36 PM, "Seyfullah Tıkıç" <sti...@gmail.com> wrote:
>>>
>>> --
>>> 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.
>>>
>>
>>
>>
>> --
>> SEYFULLAH TIKIÇ
>>
>> --
>> 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.
>>
>
>  --
> 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.
>



-- 
SEYFULLAH TIKIÇ

-- 
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.

Reply via email to