def get_form(self, context): obj = self.get_object(context) if obj: return my_comment_app.get_form()(obj) else: return None