Django "Page not found" error page shows only one of two expected urls

Posted by Frank V on Stack Overflow See other posts from Stack Overflow or by Frank V
Published on 2010-04-27T03:05:36Z Indexed on 2010/04/27 3:13 UTC
Read the original article Hit count: 256

Filed under:
|
|

I'm working with Django, admittedly for the first time doing anything real.

The URL config looks like the following:

urlpatterns = patterns('my_site.core_prototype.views',

    (r'^newpost/$', 'newPost'),

    (r'^$', 'NewPostAndDisplayList'), # capture nothing...


    #more here... - perhaps the perma-links?
)

This is in an app's url.py which is loaded from the project's url.py via:

urlpatterns = patterns('',
    # only app for now.
    (r'^$', include('my_site.core_prototype.urls')),
)

The problem is, when I receive a 404 attempting to utilize newpost, the error page only shows the ^$ -- it seems to ignore the newpost pattern...

I'm sure the solution is probably stupid-simple but right now I'm missing it. Can someone help get me on the right track...

© Stack Overflow or respective owner

Related posts about django

Related posts about urlconf