cdh.files.db.descriptors module

class cdh.files.db.descriptors.FileDescriptor(field)[source]

Bases: ForeignKeyDeferredAttribute

FileDescriptor handles the {field_name}_id field of a FileField

class cdh.files.db.descriptors.ForwardFileDescriptor(field_with_rel)[source]

Bases: ForwardManyToOneDescriptor

FileDescriptor handles the {field_name}_ field of a FileField on the child (aka the model that has the field definition, parent would be the File model).

get_object(instance)[source]

Override get_object in order to handle non-existing File objects

The default implementation does not need to worry about it, but we do (as we are hiding the fact that this is a ForeignKey relation)

class cdh.files.db.descriptors.TrackedFileDescriptor(rel)[source]

Bases: ReverseManyToOneDescriptor

related_manager_cls
property through