Right on the money Martin! Thanks alot.

I knew it was something *stupid* I had done, but after looking at the
project for so long, you lose your clarity for details :/


On May 21, 8:30 pm, "Martin Glueck" <[EMAIL PROTECTED]> wrote:
> Looking at the urls pattern reported in the 404 page it looks like there is
> twice the "^" symbol.
> And I would say that is the problem because this symbol tries to match the
> "start of a line", so the pattern
> "^news/ ^/(?P<slug>[a-zA-Z0-9-_]+)/?$" will never match to "/news/hello/".
>
> my guess is that you "include" the urls.py file in your main urls.py file
> like:
>
> urlpatterns += patterns \
>         ( ""
>         , ( "^news/",      include ("xxx.urls"))
>         )
>
> If this is the case, the you have to change the patterns in your include
> urls.py and remove the "^"  part of the pattern:
>
> urlpatterns = patterns
>     ( 'django.views.generic.list_detail'
>     , (r(?P<slug>[a-zA-Z0-9-_]+)/?$', 'object_detail', dict(news_list_info,
> slug_field='slug'))
>     , (r$', 'object_list', news_list_info),
> )
>
> That I would say it should match the "/news/hello/" url.
>
> Martin
> On 5/21/07, Panos Laganakos <[EMAIL PROTECTED]> wrote:
>
>
>
> > Hehe, this is getting old, but still things don't work.
>
> > There's no special stack trace here, I only get returned a 404 page
> > result for the list_detail page.
>
> > here's the full urls.py:
>
> > from django.conf.urls.defaults import *
> > from myproj.news.models import Entry
>
> > news_list_info = {
> >         'queryset': Entry.objects.all(),
> >         'allow_empty': True,
> > }
>
> > urlpatterns = patterns('django.views.generic.list_detail',
> >         #(r'^/(?P<slug>[-\w]+)/?$', 'object_detail', dict(news_list_info,
> > slug_field='slug')),
> >         (r'^/(?P<slug>[a-zA-Z0-9-_]+)/?$', 'object_detail',
> > dict(news_list_info, slug_field='slug')),
> >         (r'^/?$', 'object_list', news_list_info),
> > )
>
> > -----
>
> > As I noted earlier, the object_list view, works like a charm, the
> > object_detail ain't. :/
>
> > The resulting 404 page:
>
> > Using the URLconf defined in myproj.urls, Django tried these URL
> > patterns, in this order:
> > ^news/ ^/(?P<slug>[a-zA-Z0-9-_]+)/?$
> > ^news/ ^/?$
> > ^admin/
> > The current URL, /news/hello/, didn't match any of these.
>
> > On May 19, 9:57 am, Tyson Tate <[EMAIL PROTECTED]> wrote:
> > > Can you post a stack trace and more details from your url.py file?
>
> > > -Tyson
>
> > > On May 18, 2007, at 1:05 PM, Panos Laganakos wrote:
>
> > > > Thanks for the reply mate, but that doesn't seem to be the issue. I
> > > > still can't figure out what's going wrong here :/


--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to