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
|
- Remove dependency on the django-filetransfer library
|
||||||
- Fix height calculation in resize transformation
|
- Fix height calculation in resize transformation
|
||||||
- Improve upgrade instructions
|
- 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)
|
2.1.5 (2016-11-08)
|
||||||
==================
|
==================
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ Other changes
|
|||||||
the user links
|
the user links
|
||||||
- Dashboard
|
- Dashboard
|
||||||
- Moved licenses to their own module in every app
|
- Moved licenses to their own module in every app
|
||||||
|
- Update project to work with Django 1.9.11
|
||||||
|
|
||||||
Removals
|
Removals
|
||||||
--------
|
--------
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ from django.views.generic import (
|
|||||||
)
|
)
|
||||||
from django.views.generic.detail import SingleObjectMixin
|
from django.views.generic.detail import SingleObjectMixin
|
||||||
from django.views.generic.edit import (
|
from django.views.generic.edit import (
|
||||||
CreateView, DeleteView, ModelFormMixin, UpdateView
|
CreateView, DeleteView, FormMixin, ModelFormMixin, UpdateView
|
||||||
)
|
)
|
||||||
from django.views.generic.list import ListView
|
from django.views.generic.list import ListView
|
||||||
|
|
||||||
@@ -207,6 +207,16 @@ class MultiFormView(DjangoFormView):
|
|||||||
form = klass(**form_kwargs)
|
form = klass(**form_kwargs)
|
||||||
return form
|
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):
|
def get_forms(self, form_classes):
|
||||||
return dict(
|
return dict(
|
||||||
[
|
[
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
-r base.txt
|
-r base.txt
|
||||||
Django==1.8.15
|
Django==1.9.11
|
||||||
|
|||||||
Reference in New Issue
Block a user