Re: error in urlconf
On 25/09/10 21:14, bagheera wrote: Dnia 25-09-2010 o 22:04:16 Tim Sawyer napisał(a): On 25/09/10 20:39, CarloRatm wrote: http://pastebin.com/aY6tZm6j What's wrong with that code ? Thank you, cheers ^blog/ ^(?Pd+)$ should be ^blog/ ^(?P\d+)/$ ?? Tim. use raw definitions like django docs says. And why do u put ^ witch means beginning of the string in the middle? That i think would be correct: r'^articles/(?P\d+)/$' I wasn't clear. I was correcting the error message, given that the provided pastebin link didn't include any of the source, but only the 404 text. The error appears to be from two levels of urls.py. The first something like: (r'^blog/', include('application.urls')), And the second, inside the application/urls.py file, is something like: (r'^(?Pd+)', 'applications.views.view_function'), This second one is wrong, I believe it should be: (r'^(?P\d+)/', 'applications.views.view_function'), I hope that is clearer, Tim. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@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.
Re: error in urlconf
Dnia 25-09-2010 o 22:04:16 Tim Sawyer napisał(a): On 25/09/10 20:39, CarloRatm wrote: http://pastebin.com/aY6tZm6j What's wrong with that code ? Thank you, cheers ^blog/ ^(?Pd+)$ should be ^blog/ ^(?P\d+)/$ ?? Tim. use raw definitions like django docs says. And why do u put ^ witch means beginning of the string in the middle? That i think would be correct: r'^articles/(?P\d+)/$' -- Linux user -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@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.
Re: error in urlconf
On 25/09/10 20:39, CarloRatm wrote: http://pastebin.com/aY6tZm6j What's wrong with that code ? Thank you, cheers ^blog/ ^(?Pd+)$ should be ^blog/ ^(?P\d+)/$ ?? Tim. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@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.
Re: error in urlconf
Dnia 25-09-2010 o 21:39:15 CarloRatm napisał(a): http://pastebin.com/aY6tZm6j What's wrong with that code ? Thank you, cheers http://docs.djangoproject.com/en/1.2/topics/http/urls/#example And check what ^ char mean http://en.wikipedia.org/wiki/Regular_expression_examples -- Linux user -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@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.