Commits

Juergen Brendel committed d961b5d

Correct form init and attach user to all forms.

  • Participants
  • Parent commits 27e081e

Comments (0)

Files changed (1)

         if request.META.get('CONTENT_TYPE', type_formencoded) != type_formencoded:
             # The data has not been given to us as a www-form. Therefore,
             # we will assume that we are holding it as a dictionary.
-            form = v_form(request.data)
+            form = v_form(data=request.data)
         else:
             # Assuming that the data is presented as a posted form
             form = v_form(getattr(request, operation))
+
+        form.user = request.user            # Needed, because many forms require a user
     
         if form.is_valid():
             setattr(request, 'form', form)