ubernostrum  committed 60d065f

Work around the need to accept 'data' as a possibly-absent positional argument

  • Participants
  • Parent commits 1f6add3
  • Branches default

Comments (0)

Files changed (1)

     pass silently, unless explicitly silenced").
-    def __init__(self, request, *args, **kwargs):
-        super(ContactForm, self).__init__(*args, **kwargs)
+    def __init__(self, data=None, request=None, *args, **kwargs):
+        if request is None:
+            raise TypeError("Keyword argument 'request' must be supplied")
+        super(ContactForm, self).__init__(data, *args, **kwargs)
         self.request = request
     name = forms.CharField(max_length=100,