AudioFile¶
-
class
database.models.AudioFile(*args, **kwargs)¶ Bases:
database.models.file.FileA manifestation of a Source as an digital audio file.
Manifests one and only one Source.
Generated by an Encoder and validated against a SourceInstantiation by a Validator.
-
file_type¶ models.CharField – The format of this AudioFile
-
file_size¶ models.PositiveIntegerField – The size of the this AudioFile in bytes
-
version¶ models.CharField – The version of the encoding schema of this AudioFile
-
encoding_date¶ models.DateTimeField – The date this AudioFile was encoded
-
encoded_with¶ models.ForeignKey – A reference to the Encoder of this AudioFile
-
validated_by¶ models.ForeignKey – A reference to the Validator of this AudioFile
-
extra_metadata¶ django.contrib.postgres.fields.JSONField – Any extra metadata associated with this AudioFile
-
length¶ models.PositiveIntegerField – The length of this AudioFile in seconds
-
recording_date¶ models.DateField – The date this AudioFile was recorded
-
manifests¶ ForeignKey – The SourceInstantiation manifested by this AudioFile
-
file¶ models.FileField – The path to the actual file stored on disk
See also
database.models.File- The super class of AudioFile
database.models.CustomBaseModel,database.models.Source,database.models.Encoder,database.models.ValidatorAttributes Summary
encoded_withAccessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation. fileThe descriptor for the file attribute on the model instance. idA wrapper for a deferred-loading field. lengthA wrapper for a deferred-loading field. manifestsAccessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation. manifests_idA wrapper for a deferred-loading field. objectsrecording_dateA wrapper for a deferred-loading field. validated_byAccessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation. Methods Summary
get_next_by_date_created(*[, field, is_next])get_next_by_date_updated(*[, field, is_next])get_previous_by_date_created(*[, field, is_next])get_previous_by_date_updated(*[, field, is_next])Attributes Documentation
-
encoded_with Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parentis aForwardManyToOneDescriptorinstance.
-
file The descriptor for the file attribute on the model instance. Return a FieldFile when accessed so you can write code like:
>>> from myapp.models import MyModel >>> instance = MyModel.objects.get(pk=1) >>> instance.file.size
Assign a file object on assignment so you can do:
>>> with open('/path/to/hello.world', 'r') as f: ... instance.file = File(f)
-
id¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
length A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
manifests Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parentis aForwardManyToOneDescriptorinstance.
-
manifests_id¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
objects= <django.db.models.manager.Manager object>¶
-
recording_date A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
validated_by Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parentis aForwardManyToOneDescriptorinstance.
Methods Documentation
-
get_next_by_date_created(*, field=<django.db.models.fields.DateTimeField: date_created>, is_next=True, **kwargs)¶
-
get_next_by_date_updated(*, field=<django.db.models.fields.DateTimeField: date_updated>, is_next=True, **kwargs)¶
-
get_previous_by_date_created(*, field=<django.db.models.fields.DateTimeField: date_created>, is_next=False, **kwargs)¶
-
get_previous_by_date_updated(*, field=<django.db.models.fields.DateTimeField: date_updated>, is_next=False, **kwargs)¶
-