Models¶
-
class
document_catalogue.models.Document(*args, **kwargs)[source]¶ A file and the meta-data describing that file in the catalogue.
-
exception
DoesNotExist¶
-
exception
MultipleObjectsReturned¶
-
class
PrivateFileField(*args, **kwargs)¶ Filefield with private storage, custom filename and size checks.
Extra settings: -
upload_subfolder: a lambda to find the subfolder, depending on the instance. -content_types: list of allowed content types. -max_file_size: maximum file size.-
clean(*args, **kwargs)¶ Convert the value’s type and run validation. Validation errors from to_python() and validate() are propagated. Return the correct value if no error is raised.
-
generate_filename(instance, filename)¶ Apply (if callable) or prepend (if a string) upload_to to the filename, then delegate further processing of the name to the storage backend. Until the storage layer, all file paths are expected to be Unix style (with forward slashes).
-
-
exception
-
class
document_catalogue.models.DocumentCategory(*args, **kwargs)[source]¶ A hierarchical category system for assets
-
exception
DoesNotExist¶
-
exception
MultipleObjectsReturned¶
-
exception
-
class
document_catalogue.models.DocumentManager[source]¶ Manager for Document model with all methods from DocumentQuerySet.
-
class
document_catalogue.models.DocumentQueryset(model=None, query=None, using=None, hints=None)[source]¶ Custom query set for Document model