Update MultiFormView CBV to work with Django 1.9.x
This commit is contained in:
@@ -6,6 +6,12 @@
|
||||
- Remove dependency on the django-filetransfer library
|
||||
- Fix height calculation in resize transformation
|
||||
- Improve upgrade instructions
|
||||
- New image caching pipeline
|
||||
- New drop down menus for the documents, folders and tags app as well as for
|
||||
the user links
|
||||
- New Dashboard view
|
||||
- Moved licenses to their own module in every app
|
||||
- Update project to work with Django 1.9.11
|
||||
|
||||
2.1.5 (2016-11-08)
|
||||
==================
|
||||
|
||||
@@ -21,6 +21,7 @@ Other changes
|
||||
the user links
|
||||
- Dashboard
|
||||
- Moved licenses to their own module in every app
|
||||
- Update project to work with Django 1.9.11
|
||||
|
||||
Removals
|
||||
--------
|
||||
|
||||
@@ -10,7 +10,7 @@ from django.views.generic import (
|
||||
)
|
||||
from django.views.generic.detail import SingleObjectMixin
|
||||
from django.views.generic.edit import (
|
||||
CreateView, DeleteView, ModelFormMixin, UpdateView
|
||||
CreateView, DeleteView, FormMixin, ModelFormMixin, UpdateView
|
||||
)
|
||||
from django.views.generic.list import ListView
|
||||
|
||||
@@ -207,6 +207,16 @@ class MultiFormView(DjangoFormView):
|
||||
form = klass(**form_kwargs)
|
||||
return form
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
"""
|
||||
Insert the form into the context dict.
|
||||
"""
|
||||
if 'forms' not in kwargs:
|
||||
kwargs['forms'] = self.get_forms(
|
||||
form_classes=self.get_form_classes()
|
||||
)
|
||||
return super(FormMixin, self).get_context_data(**kwargs)
|
||||
|
||||
def get_forms(self, form_classes):
|
||||
return dict(
|
||||
[
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
-r base.txt
|
||||
Django==1.8.15
|
||||
Django==1.9.11
|
||||
|
||||
Reference in New Issue
Block a user