<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def generate_modelform(self):
 """Generate modelform from Django modelform_factory"""


        model_class = self.get_model_class
        excludes = self.modelform_excludes if self.modelform_excludes else []
        _ObjectForm = modelform_factory(model_class, exclude=excludes)
        return _ObjectForm