예제 #1
0
    def get_form(self, context):
        parent_id = None
        if self.parent:
            parent_id = self.parent.resolve(context, ignore_failures=True)

        obj = self.get_object(context)
        if obj:
            return comments.get_form()(obj, parent=parent_id)
        else:
            return None
예제 #2
0
    def get_form(self, context):
        parent_id = None
        if self.parent:
            parent_id = self.parent.resolve(context, ignore_failures=True)

        obj = self.get_object(context)
        if obj:
            return comments.get_form()(obj, parent=parent_id)
        else:
            return None
예제 #3
0
 def get_form(self, context):
     obj = self.get_object(context)
     if obj:
         return comments.get_form()(obj)
     else:
         return None
예제 #4
0
 def get_form(self, context):
     obj = self.get_object(context)
     if obj:
         return comments.get_form()(obj)
     else:
         return None