How can I get the full name of the current view (my_app.views.index) in a template in Django 1.5?
With forms, I have an object called "view" in the template which I read using a template tag. But with DetailViews I doesn't see anything similar.
Is there a way using a custom template processor?
Thanks
EDIT
Situation 1:
- I retrieve a page, for example '/foo/bar/5/edit'.
- Django will call 'foo.views.editbar' with pk=5.
- This view renders an template 'foo/bar_form.html'
Situation 2:
- If I retrieve '/foo/bar/new'
- Django will call 'foo.views.newbar'
- This view renders the same template as above ('foo/bar_form.html')
How can I check in this template 'foo/bar_form.html', from which view it has been rendered? The result should be one of
- 'foo.views.editbar'
- 'foo.views.newbar'