start taking more advantage of class based views
This commit is contained in:
+11
-1
@@ -2247,7 +2247,17 @@ class CaseCollectionAuthorUpdate(RevisionMixin, AuthorRequiredMixin, UpdateView)
|
||||
form_class = CaseCollectionAuthorForm
|
||||
template_name = "author_form.html"
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
context = super(CaseCollectionAuthorUpdate, self).get_context_data(**kwargs)
|
||||
context["collection"] = context["object"]
|
||||
return context
|
||||
|
||||
class CaseAuthorUpdate(RevisionMixin, AuthorRequiredMixin, UpdateView):
|
||||
model = Case
|
||||
form_class = CaseAuthorForm
|
||||
template_name = "author_form.html"
|
||||
template_name = "author_form.html"
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
context = super(CaseAuthorUpdate, self).get_context_data(**kwargs)
|
||||
context["collection"] = context["object"]
|
||||
return context
|
||||
Reference in New Issue
Block a user