I wonder if it is possible to get the attribute of an object in Django Class Based Views.
What I try to do is the following:
I have an UpdateView:
class FooUpdate(UpdateView):
model = Foo
page_title = <foo-object's name should go here>
page_title is processed by the template with
...
<title>
{{ view.page_title }}
</title>
...
(this technique is described here)
urls.py looks like this:
...
url(r'^edit/(?P<pk>[0-9]+)/$', views.FooUpdate.as_view(), name="edit")
...
How can I set page_title in the view?
I am aware that there are plenty other ways to achieve this, but setting a variable in the view was really convenient (up to now) ...