Пример #1
0
    def get_revisionform_class(self):
        """Get the correct revision form edition form class."""
        document = self.object

        # If there is no document (e.g when creating a new document)
        # we need to create a dummy object just to get the associated
        # revision class. TODO find a better way to do this
        if not document:
            document = self.get_document_class()()

        return documentform_factory(document.get_revision_class())
Пример #2
0
    def get_revisionform_class(self):
        """Get the correct revision form edition form class."""
        document = self.object

        # If there is no document (e.g when creating a new document)
        # we need to create a dummy object just to get the associated
        # revision class. TODO find a better way to do this
        if not document:
            document = self.get_document_class()()

        return documentform_factory(document.get_revision_class())
Пример #3
0
 def get_form_class(self):
     """Get the document form edition form class."""
     return documentform_factory(self.get_document_class())
Пример #4
0
 def get_revisionform_class(self):
     obj_class = self.imported_type.model_class()
     obj = obj_class()
     form_class = documentform_factory(obj.get_revision_class())
     return form_class
Пример #5
0
 def get_form_class(self):
     form_class = documentform_factory(self.imported_type.model_class())
     return form_class
Пример #6
0
 def get_revision_form_class(self):
     return documentform_factory(self.revision_class())
Пример #7
0
 def get_metadata_form_class(self):
     return documentform_factory(self.document_class())
Пример #8
0
 def get_form_class(self):
     """Get the document form edition form class."""
     return documentform_factory(self.get_document_class())
Пример #9
0
 def get_revision_form_class(self):
     return documentform_factory(self.revision_class())
Пример #10
0
 def get_metadata_form_class(self):
     return documentform_factory(self.document_class())