Op zaterdag 21 mei 2011 03:50:40 UTC+1 schreef Dagon het volgende: > > I am a newbie to both Python and Django. > Why does urlpatterns = patterns('', (r'^People/$', > 'iFriends.People.views.index') get me the following error message: > > Using the URLconf defined in iFriends.urls, Django tried these URL > patterns, in this order: > ^People/$ > > The current URL, , didn't match any of these. > > If I use the pattern (r'^$', 'iFriends.People.views.index') I get the > desired results. > > Charles
I can't quite see what you're confused about here. If you only specify a urlpattern of '^People/$', then Django is only going to match against that regex - so only the URL '/People/' will match, and the base URL of '/' will not. Your other pattern matches the base URL, so it works. -- DR. -- 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.