Re: regex error?

2014-05-07 Thread Sergiy Khohlov
try this one
 url(r'/(?P\d+)$', DetailView.as_view(
model = Customer,
template_name="customer.html")),


Many thanks,

Serge


+380 636150445
skype: skhohlov

-- 
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/CADTRxJMX0sF6AUbtbtOAzaJcdjJ6WJGgL_RvoxdJnrufMKn3MA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: regex error?

2014-05-06 Thread G Z
ive also tried 

  url(r'^customers/([0-9])/$', DetailView.as_view(
model = Customer,
template_name="customer.html")),

-- 
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/623792ae-7ecd-4177-b2e1-ec502781c157%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


regex error?

2014-05-06 Thread G Z
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.