On Aug 11, 8:27 pm, When ideas fail <andrewkenyon...@gmail.com> wrote:
> After some more experiments i've decided its definetly some sort of
> problem with the URLs, if i comment one out the 2nd works and if i
> have them uncomment it doesn't.
>
> Can anyone help me with this please?
>
> On 11 Aug, 19:30, When ideas fail <andrewkenyon...@gmail.com> wrote:
>
>
>
> > Hi, I have a strange error which i hope someone might be able to help
> > me with. Two of my urls seems to be conflicting somehow. i have these
> > two URLs:
>
> >     (r'^blog/(?P<slug>.+)/$', 'mysite.blog.views.title_view'),
> >     (r'^blog/category/(?P<category>.+)/$',
> > 'mysite.blog.views.category_view'),

Your first regex is matching everything after /blog/ - including /blog/
category/<slug>/. So your url is being dispatched to the first view,
which is trying to match a post with the title 'category/Andrew',
which obviously doesn't exist.

Either move the second URL above the first, or use \w+ instead of .+
to match only word characters within the slug, or preferably both.
--
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to