Hi,

I am going through the tutorial and have come to Decoupling the
URLconfs @ http://www.djangoproject.com/documentation/tutorial03/


When I decouple the page at http://192.168.0.101:8000/polls/ just
gives me a "It Worked!" welcome page. I've attached my urls.py configs


Thanks for your help,

Gary






mysite/urls.py
=-=-=-=-=-=-=-=

from django.conf.urls.defaults import *

urlpatterns = patterns(
    (r'^polls/', include('mysite.polls.urls')),
)




mysite/polls/urls.py
=-=-=-=-=-=-=-=-=-=

from django.conf.urls.defaults import *

urlpatterns = patterns('mysite.polls.views',
    (r'^$', 'index'),
    (r'^(?P<poll_id>\d+)/$', 'detail'),
    (r'^(?P<poll_id>\d+)/results/$', 'results'),
    (r'^(?P<poll_id>\d+)/vote/$', 'vote'),
)




mysite/polls/views.py
=-=-=-=-=-=-=-=-=-=-=

from django.shortcuts import render_to_response, get_object_or_404
from mysite.polls.models import Poll

def index(request):
    latest_poll_list = Poll.objects.all().order_by('-pub_date')[:5]
    return render_to_response('polls/index.html', {'latest_poll_list':
latest_poll_list})


def detail(request, poll_id):
    p = get_object_or_404(Poll, pk=poll_id)
    return render_to_response('polls/detail.html', {'poll': p})

--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to