Including a Django app's url.py is resulting in a 404
Remove the $
from the regex of main urls.py
urlpatterns = patterns('', (r'^gallery/', include('mysite.gallery.urls')),)
You don't need gallery
in the included Urlconf.
urlpatterns = patterns('', (r'^browse/$', 'mysite.gallery.views.browse'), (r'^photo/$', 'mysite.gallery.views.photo'),)
Read the django docs for more information
Note that the regular expressions in this example don't have a
$
(end-of-string match character) but do include a trailing slash. Whenever Django encountersinclude()
, it chops off whatever part of the URL matched up to that point and sends the remaining string to the included URLconf for further processing.