add request.FILES to form

This commit is contained in:
LB 2017-08-26 15:45:06 +02:00 committed by Matt Westcott
parent 3baf087979
commit 0b90ee15fa
3 changed files with 3 additions and 1 deletions

View file

@ -6,6 +6,7 @@ Changelog
* Custom document model is now documented (Emily Horsman)
* Use minified versions of CSS in the admin by adding minification to the front-end tooling (Vincent Audebert, Thibaud Colas)
* Wagtailforms serve view now passes `request.FILES`, for use in custom form handlers (LB (Ben Johnston))
* Fix: "Open Link in New Tab" on a right arrow in page explorer should open page list (Emily Horsman)
* Fix: Using `order_by_relevance=False` when searching with PostgreSQL now works (Mitchel Cabuloy)
* Fix: Inline panel first and last sorting arrows correctly hidden in non-default tabs (Matt Westcott)

View file

@ -16,6 +16,7 @@ Other features
* :doc:`Custom document model </advanced_topics/documents/custom_document_model>` is now documented (Emily Horsman)
* Use minified versions of CSS in the admin by adding minification to the front-end tooling (Vincent Audebert, Thibaud Colas)
* Wagtailforms serve view now passes ``request.FILES``, for use in custom form handlers (LB (Ben Johnston))
Bug fixes

View file

@ -237,7 +237,7 @@ class AbstractForm(Page):
def serve(self, request, *args, **kwargs):
if request.method == 'POST':
form = self.get_form(request.POST, page=self, user=request.user)
form = self.get_form(request.POST, request.FILES, page=self, user=request.user)
if form.is_valid():
self.process_form_submission(form)