Im using detailview to display customer individualy when the link is
clicked on but its not recognizing the number i think my regex is wrong..
this is what i have
from django.conf.urls import patterns, include, url
from django.views.generic.list import ListView
from django.views.generic.detail import DetailView
from vmware.models import Customer
urlpatterns = patterns('',
url(r'^$', ListView.as_view(
queryset=Customer.objects.all().order_by("-id")[:100],
template_name="vms.html")),
url(r'^(?P\d+)$', DetailView.as_view(
model = Customer,
template_name="customer.html")),
)
This is what im getting
Page not found (404)
Request Method: GET
Request URL:http://pythondev.enki.co:8001/customers/2
Using the URLconf defined in provisioning.urls, Django tried these URL
patterns, in this order:
^admin/
^customers ^$
^customers ^(?P\d+)$
^test/
The current URL, customers/2, didn't match any of these.
You're seeing this error because you have DEBUG = True in your Django
settings file. Change that to False, and Django will display a standard 404
page.
>From what I understand that means the regex isnt matching..
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/ff13064e-6600-416f-8c3a-b8b7a6d117d9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.