I don't know if the URL you show is literally what you hit or not. If it is, then it doesn't match because "param1" doesn't match "\d+" which means one or more digits. Same for param2.
--Ned. almostvindiesel wrote: > Hi all, > > I'm new to regex/django/python, and I'm having trouble getting urls.py > to pass a request to a view. Specifically, when I hit: > > http://django.mysite.com/chef/home/param1/param2/ > > I'd expect the 3rd from the last pattern to match: > > ########################## my urls.py file ########################## > urlpatterns = patterns('', > (r'^chef/admin/home/$','mysite.chef.views.admin_home'), > (r'^chef/admin/edit/(?P<recipe_id>\d+)/ > $','mysite.chef.views.edit_recipe'), > (r'^chef/admin/add/$','mysite.chef.views.add_recipe'), > (r'^chef/admin/delete/(?P<recipe_id>\d+)/ > $','mysite.chef.views.delete_recipe'), > (r'^chef/admin/save/$','mysite.chef.views.save_recipe'), > (r'^chef/admin/error/$','mysite.chef.views.error'), > (r'^chef/admin/profile/$','mysite.chef.views.edit_profile'), > (r'^chef/home/$','mysite.chef.views.home'), > (r'^chef/home/(?P<sort_attr>\d+)/(?P<ord>\d+)/ > $','mysite.chef.views.sort_recipes'), > (r'^admin/', include('django.contrib.admin.urls')), > (r'^chef/', include('mysite.chef.urls')), > ) > > Instead I get a Page not found (404) error. All of my other requests > work fine. Any thoughts as to what I'm doing wrong? > > Cheers, > > ~John > > > > -- Ned Batchelder, http://nedbatchelder.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [email protected] 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 -~----------~----~----~----~------~----~------~--~---

