[Answered ]-Get_form throws TypeError after upgrading Django to 1.10

2👍

As of Django 1.8, the get_form() method doesn’t require a form_class to be provided anymore. As of Django 1.10, you must define a default value for form_class in your custom get_form method.

You could change it as follows.

def get_form(self, form_class=None):
    if form_class is None:
        form_class = self.form_class
    ...

Leave a comment