I have followed the tutorials in setting up a basic index and detail
page for one of my model classes. I created the project level urls.py
as follows:

from django.conf.urls.defaults import *
urlpatterns = patterns('',
    (r'^accounts/$', include('RealLife.crm.urls')),
    (r'^admin/', include('django.contrib.admin.urls.admin')),
)

and my application urls.py as follows:

from django.conf.urls.defaults import *
urlpatterns = patterns('RealLife.crm.views',
    (r'^$', 'account_list'),
    (r'^(?P<account_id>\d+)/$', 'account_detail'),
)

When I run my app the admin page works perfectly, also a call to
/accounts/ resolves correctly but a URL of the form /accounts/1/ does
not, I get the error:

Using the URLconf defined in RealLife.urls, Django tried these URL
patterns, in this order:
   1. ^accounts/$
   2. ^admin/
The current URL, /accounts/1/, didn't match any of these.

I am intrigued as to why my second application-level url regex isn't
working, I don't even see it in the list of URLs it tried to use.

Any help would be appreciated.


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

Reply via email to