I'm using django 1.4 on a project, and I want to use a template across the views of many apps. My urls.py looks like
urlpatterns = patterns('',
url(r'^canvas/', include('canvas.urls', namespace="canvas")),
url(r'^checkin/', include('checkin.urls', namespace="checkin")),
url(r'^show/', include('facebook_tab.urls', namespace="show")),
My canvas/urls.py
from django.conf.urls import patterns, url
from canvas.views import AllShowsView
urlpatterns = patterns('',
url(r'^shows/$', AllShowsView.as_view(), name='shows'),
)
My facebook_tab/urls.py
from django.conf.urls import patterns, url
from facebook_tab.views import AllShowsView
urlpatterns = patterns('',
url(r'^shows/$', AllShowsView.as_view(), name='shows'),
)
And I would like to use a template in such a way that I don't have to refer to the current namespace when using {% url shows %}.
I tried passing current_app to the Context dictionary with no success. Also it doesn't work when I try to do something like reverse("shows", current_app="canvas"). Official documentation is not quite clear about it.