catalog.api.models package#
Submodules#
catalog.api.models.audio module#
- class catalog.api.models.audio.AltAudioFile(attrs)#
Bases:
AbstractAltFile
- property bit_rate_in_kbps#
- property sample_rate_in_khz#
- class catalog.api.models.audio.Audio(*args, **kwargs)#
Bases:
AudioFileMixin
,AbstractMedia
Represents one audio media instance.
Inherited fields#
category: eg. music, sound_effect, podcast, news & audiobook
- exception DoesNotExist#
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned#
Bases:
MultipleObjectsReturned
- alt_files#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- property alternative_files#
- audio_report#
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- property audio_set#
- audio_set_foreign_identifier#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- audio_set_position#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- audioset#
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.parent
is aForwardManyToOneDescriptor
instance.
- bit_rate#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- category#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- created_on#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- creator#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- creator_url#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- deleted_audio#
Accessor to the related object on the reverse side of a one-to-one relation.
In the example:
class Restaurant(Model): place = OneToOneField(Place, related_name='restaurant')
Place.restaurant
is aReverseOneToOneDescriptor
instance.
- duration#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- property duration_in_s#
- filesize#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- filetype#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- foreign_identifier#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- foreign_landing_url#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- genres#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- get_next_by_created_on(*, field=<django.db.models.fields.DateTimeField: created_on>, is_next=True, **kwargs)#
- get_next_by_updated_on(*, field=<django.db.models.fields.DateTimeField: updated_on>, is_next=True, **kwargs)#
- get_or_create_waveform()#
- get_previous_by_created_on(*, field=<django.db.models.fields.DateTimeField: created_on>, is_next=False, **kwargs)#
- get_previous_by_updated_on(*, field=<django.db.models.fields.DateTimeField: updated_on>, is_next=False, **kwargs)#
- get_waveform() list[float] #
Get the waveform if it exists. Return a blank list otherwise.
- Returns:
the waveform, if it exists; empty list otherwise
- id#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- identifier#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- last_synced_with_source#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- license#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- license_version#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- lists#
Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
Pizza.toppings
andTopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- property mature: bool#
- mature_audio#
Accessor to the related object on the reverse side of a one-to-one relation.
In the example:
class Restaurant(Model): place = OneToOneField(Place, related_name='restaurant')
Place.restaurant
is aReverseOneToOneDescriptor
instance.
- meta_data#
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>#
- provider#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- removed_from_source#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- sample_rate#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- source#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- tags#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- tags_list#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- thumbnail#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- title#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- updated_on#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- url#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- view_count#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- watermarked#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- class catalog.api.models.audio.AudioAddOn(created_on, updated_on, audio_identifier, waveform_peaks)#
Bases:
OpenLedgerModel
- exception DoesNotExist#
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned#
Bases:
MultipleObjectsReturned
- audio_identifier#
This cannot be a “ForeignKey” or “OneToOneRel” because the refresh process wipes out the Audio table completely and recreates it. If we made these a FK or OneToOneRel there’d be foreign key constraint added that would be violated when the Audio table is recreated.
The index is necessary as this column is used by the Audio object to query for the relevant add on.
The refresh process will also eventually include cleaning up any potentially dangling audio_add_on rows.
- created_on#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- get_next_by_created_on(*, field=<django.db.models.fields.DateTimeField: created_on>, is_next=True, **kwargs)#
- get_next_by_updated_on(*, field=<django.db.models.fields.DateTimeField: updated_on>, is_next=True, **kwargs)#
- get_previous_by_created_on(*, field=<django.db.models.fields.DateTimeField: created_on>, is_next=False, **kwargs)#
- get_previous_by_updated_on(*, field=<django.db.models.fields.DateTimeField: updated_on>, is_next=False, **kwargs)#
- objects = <django.db.models.manager.Manager object>#
- updated_on#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- waveform_peaks#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- class catalog.api.models.audio.AudioFileMixin(*args, **kwargs)#
Bases:
FileMixin
This mixin adds fields related to audio quality to the standard file mixin.
Do not use this as the sole base class.
- bit_rate#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- property bit_rate_in_kbps#
- filesize#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- filetype#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- sample_rate#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- property sample_rate_in_khz#
- url#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- class catalog.api.models.audio.AudioList(id, created_on, updated_on, title, slug, auth)#
Bases:
AbstractMediaList
- exception DoesNotExist#
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned#
Bases:
MultipleObjectsReturned
- audios#
Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
Pizza.toppings
andTopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- auth#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- created_on#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- get_next_by_created_on(*, field=<django.db.models.fields.DateTimeField: created_on>, is_next=True, **kwargs)#
- get_next_by_updated_on(*, field=<django.db.models.fields.DateTimeField: updated_on>, is_next=True, **kwargs)#
- get_previous_by_created_on(*, field=<django.db.models.fields.DateTimeField: created_on>, is_next=False, **kwargs)#
- get_previous_by_updated_on(*, field=<django.db.models.fields.DateTimeField: updated_on>, is_next=False, **kwargs)#
- 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>#
- save(*args, **kwargs)#
Save the current instance. Override this in a subclass if you want to control the saving process.
The ‘force_insert’ and ‘force_update’ parameters can be used to insist that the “save” must be an SQL insert or update (or equivalent for non-SQL backends), respectively. Normally, they should not be set.
- slug#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- title#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- updated_on#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- class catalog.api.models.audio.AudioReport(id, created_at, reason, description, status, media_obj)#
Bases:
AbstractMediaReport
- exception DoesNotExist#
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned#
Bases:
MultipleObjectsReturned
- property audio_url#
- created_at#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- deleted_class#
alias of
DeletedAudio
- description#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- get_next_by_created_at(*, field=<django.db.models.fields.DateTimeField: created_at>, is_next=True, **kwargs)#
- get_previous_by_created_at(*, field=<django.db.models.fields.DateTimeField: created_at>, is_next=False, **kwargs)#
- get_reason_display(*, field=<django.db.models.fields.CharField: reason>)#
- get_status_display(*, field=<django.db.models.fields.CharField: status>)#
- id#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- mature_class#
alias of
MatureAudio
- media_obj#
There can be many reports associated with a single media item, hence foreign key. Sub-classes must override this field to point to a concrete sub-class of
AbstractMedia
.
- media_obj_id#
- objects = <django.db.models.manager.Manager object>#
- reason#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- status#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- class catalog.api.models.audio.AudioSet(*args, **kwargs)#
Bases:
ForeignIdentifierMixin
,MediaMixin
,FileMixin
,OpenLedgerModel
This is an ordered collection of audio files, such as a podcast series or an album.
Not to be confused with AudioList which is a many-to-many collection of audio files, like a playlist or favourites library.
The FileMixin inherited by this model refers not to audio but album art.
- exception DoesNotExist#
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned#
Bases:
MultipleObjectsReturned
- audio_set#
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- created_on#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- creator#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- creator_url#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- filesize#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- filetype#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- foreign_identifier#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- foreign_landing_url#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- get_next_by_created_on(*, field=<django.db.models.fields.DateTimeField: created_on>, is_next=True, **kwargs)#
- get_next_by_updated_on(*, field=<django.db.models.fields.DateTimeField: updated_on>, is_next=True, **kwargs)#
- get_previous_by_created_on(*, field=<django.db.models.fields.DateTimeField: created_on>, is_next=False, **kwargs)#
- get_previous_by_updated_on(*, field=<django.db.models.fields.DateTimeField: updated_on>, is_next=False, **kwargs)#
- id#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- property identifier#
- objects = <django.db.models.manager.Manager object>#
- provider#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- thumbnail#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- title#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- property tracks#
- updated_on#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- url#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- class catalog.api.models.audio.DeletedAudio(*args, **kwargs)#
Bases:
AbstractDeletedMedia
Stores identifiers of audio tracks that have been deleted from the source.
Do not create instances of this model manually. Create an
AudioReport
instance instead.- exception DoesNotExist#
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned#
Bases:
MultipleObjectsReturned
- created_on#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- es_index: str = 'audio'#
the name of the ES index from
settings.MEDIA_INDEX_MAPPING
- get_next_by_created_on(*, field=<django.db.models.fields.DateTimeField: created_on>, is_next=True, **kwargs)#
- get_next_by_updated_on(*, field=<django.db.models.fields.DateTimeField: updated_on>, is_next=True, **kwargs)#
- get_previous_by_created_on(*, field=<django.db.models.fields.DateTimeField: created_on>, is_next=False, **kwargs)#
- get_previous_by_updated_on(*, field=<django.db.models.fields.DateTimeField: updated_on>, is_next=False, **kwargs)#
- media_obj#
Sub-classes must override this field to point to a concrete sub-class of
AbstractMedia
.
- media_obj_id#
- objects = <django.db.models.manager.Manager object>#
- updated_on#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- class catalog.api.models.audio.MatureAudio(*args, **kwargs)#
Bases:
AbstractMatureMedia
Stores all audio tracks that have been flagged as ‘mature’.
Do not create instances of this model manually. Create an
AudioReport
instance instead.- exception DoesNotExist#
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned#
Bases:
MultipleObjectsReturned
- created_on#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- es_index: str = 'audio'#
the name of the ES index from
settings.MEDIA_INDEX_MAPPING
- get_next_by_created_on(*, field=<django.db.models.fields.DateTimeField: created_on>, is_next=True, **kwargs)#
- get_previous_by_created_on(*, field=<django.db.models.fields.DateTimeField: created_on>, is_next=False, **kwargs)#
- media_obj#
Sub-classes must override this field to point to a concrete sub-class of
AbstractMedia
.
- media_obj_id#
- objects = <django.db.models.manager.Manager object>#
catalog.api.models.base module#
- class catalog.api.models.base.OpenLedgerModel(*args, **kwargs)#
Bases:
Model
- created_on#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- get_next_by_created_on(*, field=<django.db.models.fields.DateTimeField: created_on>, is_next=True, **kwargs)#
- get_next_by_updated_on(*, field=<django.db.models.fields.DateTimeField: updated_on>, is_next=True, **kwargs)#
- get_previous_by_created_on(*, field=<django.db.models.fields.DateTimeField: created_on>, is_next=False, **kwargs)#
- get_previous_by_updated_on(*, field=<django.db.models.fields.DateTimeField: updated_on>, is_next=False, **kwargs)#
- updated_on#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
catalog.api.models.image module#
- class catalog.api.models.image.DeletedImage(*args, **kwargs)#
Bases:
AbstractDeletedMedia
Stores identifiers of images that have been deleted from the source.
Do not create instances of this model manually. Create an
ImageReport
instance instead.- exception DoesNotExist#
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned#
Bases:
MultipleObjectsReturned
- created_on#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- es_index: str = 'image'#
the name of the ES index from
settings.MEDIA_INDEX_MAPPING
- get_next_by_created_on(*, field=<django.db.models.fields.DateTimeField: created_on>, is_next=True, **kwargs)#
- get_next_by_updated_on(*, field=<django.db.models.fields.DateTimeField: updated_on>, is_next=True, **kwargs)#
- get_previous_by_created_on(*, field=<django.db.models.fields.DateTimeField: created_on>, is_next=False, **kwargs)#
- get_previous_by_updated_on(*, field=<django.db.models.fields.DateTimeField: updated_on>, is_next=False, **kwargs)#
- media_obj#
Sub-classes must override this field to point to a concrete sub-class of
AbstractMedia
.
- media_obj_id#
- objects = <django.db.models.manager.Manager object>#
- updated_on#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- class catalog.api.models.image.Image(*args, **kwargs)#
Bases:
ImageFileMixin
,AbstractMedia
Represents one image media instance.
Inherited fields#
category: eg. photograph, digitized_artwork & illustration
- exception DoesNotExist#
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned#
Bases:
MultipleObjectsReturned
- category#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- created_on#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- creator#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- creator_url#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- deleted_image#
Accessor to the related object on the reverse side of a one-to-one relation.
In the example:
class Restaurant(Model): place = OneToOneField(Place, related_name='restaurant')
Place.restaurant
is aReverseOneToOneDescriptor
instance.
- filesize#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- filetype#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- foreign_identifier#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- foreign_landing_url#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- get_next_by_created_on(*, field=<django.db.models.fields.DateTimeField: created_on>, is_next=True, **kwargs)#
- get_next_by_updated_on(*, field=<django.db.models.fields.DateTimeField: updated_on>, is_next=True, **kwargs)#
- get_previous_by_created_on(*, field=<django.db.models.fields.DateTimeField: created_on>, is_next=False, **kwargs)#
- get_previous_by_updated_on(*, field=<django.db.models.fields.DateTimeField: updated_on>, is_next=False, **kwargs)#
- height#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- id#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- identifier#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- image_report#
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- last_synced_with_source#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- license#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- license_version#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- lists#
Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
Pizza.toppings
andTopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- property mature: bool#
- mature_image#
Accessor to the related object on the reverse side of a one-to-one relation.
In the example:
class Restaurant(Model): place = OneToOneField(Place, related_name='restaurant')
Place.restaurant
is aReverseOneToOneDescriptor
instance.
- meta_data#
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>#
- provider#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- removed_from_source#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- source#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- tags#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- tags_list#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- thumbnail#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- title#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- updated_on#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- url#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- view_count#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- watermarked#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- width#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- class catalog.api.models.image.ImageFileMixin(*args, **kwargs)#
Bases:
FileMixin
This mixin adds fields related to image resolution to the standard file mixin.
Do not use this as the sole base class.
- filesize#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- filetype#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- height#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- property resolution_in_mp#
- url#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- width#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- class catalog.api.models.image.ImageList(id, created_on, updated_on, title, slug, auth)#
Bases:
AbstractMediaList
- exception DoesNotExist#
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned#
Bases:
MultipleObjectsReturned
- auth#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- created_on#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- get_next_by_created_on(*, field=<django.db.models.fields.DateTimeField: created_on>, is_next=True, **kwargs)#
- get_next_by_updated_on(*, field=<django.db.models.fields.DateTimeField: updated_on>, is_next=True, **kwargs)#
- get_previous_by_created_on(*, field=<django.db.models.fields.DateTimeField: created_on>, is_next=False, **kwargs)#
- get_previous_by_updated_on(*, field=<django.db.models.fields.DateTimeField: updated_on>, is_next=False, **kwargs)#
- id#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- images#
Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
Pizza.toppings
andTopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- objects = <django.db.models.manager.Manager object>#
- save(*args, **kwargs)#
Save the current instance. Override this in a subclass if you want to control the saving process.
The ‘force_insert’ and ‘force_update’ parameters can be used to insist that the “save” must be an SQL insert or update (or equivalent for non-SQL backends), respectively. Normally, they should not be set.
- slug#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- title#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- updated_on#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- class catalog.api.models.image.ImageReport(id, created_at, reason, description, status, media_obj)#
Bases:
AbstractMediaReport
- exception DoesNotExist#
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned#
Bases:
MultipleObjectsReturned
- created_at#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- deleted_class#
alias of
DeletedImage
- description#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- get_next_by_created_at(*, field=<django.db.models.fields.DateTimeField: created_at>, is_next=True, **kwargs)#
- get_previous_by_created_at(*, field=<django.db.models.fields.DateTimeField: created_at>, is_next=False, **kwargs)#
- get_reason_display(*, field=<django.db.models.fields.CharField: reason>)#
- get_status_display(*, field=<django.db.models.fields.CharField: status>)#
- id#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- property image_url#
- mature_class#
alias of
MatureImage
- media_obj#
There can be many reports associated with a single media item, hence foreign key. Sub-classes must override this field to point to a concrete sub-class of
AbstractMedia
.
- media_obj_id#
- objects = <django.db.models.manager.Manager object>#
- reason#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- status#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- class catalog.api.models.image.MatureImage(*args, **kwargs)#
Bases:
AbstractMatureMedia
Stores all images that have been flagged as ‘mature’.
Do not create instances of this model manually. Create an
ImageReport
instance instead.- exception DoesNotExist#
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned#
Bases:
MultipleObjectsReturned
- created_on#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- es_index: str = 'image'#
the name of the ES index from
settings.MEDIA_INDEX_MAPPING
- get_next_by_created_on(*, field=<django.db.models.fields.DateTimeField: created_on>, is_next=True, **kwargs)#
- get_previous_by_created_on(*, field=<django.db.models.fields.DateTimeField: created_on>, is_next=False, **kwargs)#
- media_obj#
Sub-classes must override this field to point to a concrete sub-class of
AbstractMedia
.
- media_obj_id#
- objects = <django.db.models.manager.Manager object>#
catalog.api.models.media module#
- class catalog.api.models.media.AbstractAltFile(attrs)#
Bases:
object
This is not a Django model.
This Python class serves as the schema for an alternative file. An alt file provides alternative qualities, formats and resolutions that are available from the provider that are not canonical.
The schema of the class must correspond to that of the
catalog.api.models.mixins.FileMixin
class.- property mime_type#
Get the MIME type of the file inferred from the extension of the file.
- Returns:
the inferred MIME type of the file
- property size_in_mb#
- property size_in_mib#
- class catalog.api.models.media.AbstractDeletedMedia(*args, **kwargs)#
Bases:
OpenLedgerModel
Generic model from which to inherit all deleted media classes.
‘Deleted’ here refers to media which has been deleted at the source or intentionally de-indexed by us. Unlike mature reports, this action is irreversible. Subclasses must populate
media_class
andes_index
fields.- created_on#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- es_index: str = None#
the name of the ES index from
settings.MEDIA_INDEX_MAPPING
- get_next_by_created_on(*, field=<django.db.models.fields.DateTimeField: created_on>, is_next=True, **kwargs)#
- get_next_by_updated_on(*, field=<django.db.models.fields.DateTimeField: updated_on>, is_next=True, **kwargs)#
- get_previous_by_created_on(*, field=<django.db.models.fields.DateTimeField: created_on>, is_next=False, **kwargs)#
- get_previous_by_updated_on(*, field=<django.db.models.fields.DateTimeField: updated_on>, is_next=False, **kwargs)#
- media_class: type[django.db.models.base.Model] = None#
the model class associated with this media type e.g.
Image
orAudio
- media_obj#
Sub-classes must override this field to point to a concrete sub-class of
AbstractMedia
.
- media_obj_id#
- save(*args, **kwargs)#
Save the current instance. Override this in a subclass if you want to control the saving process.
The ‘force_insert’ and ‘force_update’ parameters can be used to insist that the “save” must be an SQL insert or update (or equivalent for non-SQL backends), respectively. Normally, they should not be set.
- updated_on#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- class catalog.api.models.media.AbstractMatureMedia(*args, **kwargs)#
Bases:
Model
Generic model from which to inherit all mature media classes.
Subclasses must populate
media_class
andes_index
fields.- created_on#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- delete(*args, **kwargs)#
- es_index: str = None#
the name of the ES index from
settings.MEDIA_INDEX_MAPPING
- get_next_by_created_on(*, field=<django.db.models.fields.DateTimeField: created_on>, is_next=True, **kwargs)#
- get_previous_by_created_on(*, field=<django.db.models.fields.DateTimeField: created_on>, is_next=False, **kwargs)#
- media_class: type[django.db.models.base.Model] = None#
the model class associated with this media type e.g.
Image
orAudio
- media_obj#
Sub-classes must override this field to point to a concrete sub-class of
AbstractMedia
.
- media_obj_id#
- save(*args, **kwargs)#
Save the current instance. Override this in a subclass if you want to control the saving process.
The ‘force_insert’ and ‘force_update’ parameters can be used to insist that the “save” must be an SQL insert or update (or equivalent for non-SQL backends), respectively. Normally, they should not be set.
- class catalog.api.models.media.AbstractMedia(*args, **kwargs)#
Bases:
IdentifierMixin
,ForeignIdentifierMixin
,MediaMixin
,OpenLedgerModel
Generic model from which to inherit all media classes.
This class stores information common to all media types indexed by Openverse.
- class Meta#
Bases:
object
Meta class for all media types indexed by Openverse.
All concrete media classes should inherit their Meta class from this.
- abstract = False#
- constraints = [<UniqueConstraint: fields=('foreign_identifier', 'provider') name='unique_provider_%(class)s'>]#
- ordering = ['-created_on']#
- property attribution: str#
The plain-text English attribution for a media item.
Use this to credit creators for their work and fulfill legal attribution requirements.
- category#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- created_on#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- creator#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- creator_url#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- foreign_identifier#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- foreign_landing_url#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- get_next_by_created_on(*, field=<django.db.models.fields.DateTimeField: created_on>, is_next=True, **kwargs)#
- get_next_by_updated_on(*, field=<django.db.models.fields.DateTimeField: updated_on>, is_next=True, **kwargs)#
- get_previous_by_created_on(*, field=<django.db.models.fields.DateTimeField: created_on>, is_next=False, **kwargs)#
- get_previous_by_updated_on(*, field=<django.db.models.fields.DateTimeField: updated_on>, is_next=False, **kwargs)#
- identifier#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- last_synced_with_source#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- license#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- property license_url: str#
A direct link to the license deed or legal terms.
- license_version#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- meta_data#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- provider#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- removed_from_source#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- source#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- tags#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- tags_list#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- thumbnail#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- title#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- updated_on#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- view_count#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- watermarked#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- class catalog.api.models.media.AbstractMediaList(*args, **kwargs)#
Bases:
OpenLedgerModel
Generic model from which to inherit media lists.
Each subclass should define its own ManyToManyField to point to a subclass of AbstractMedia.
- auth#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- created_on#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- get_next_by_created_on(*, field=<django.db.models.fields.DateTimeField: created_on>, is_next=True, **kwargs)#
- get_next_by_updated_on(*, field=<django.db.models.fields.DateTimeField: updated_on>, is_next=True, **kwargs)#
- get_previous_by_created_on(*, field=<django.db.models.fields.DateTimeField: created_on>, is_next=False, **kwargs)#
- get_previous_by_updated_on(*, field=<django.db.models.fields.DateTimeField: updated_on>, is_next=False, **kwargs)#
- slug#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- title#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- updated_on#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- class catalog.api.models.media.AbstractMediaReport(*args, **kwargs)#
Bases:
Model
Generic model from which to inherit all reported media classes.
‘Reported’ here refers to content reports such as mature, copyright-violating or deleted content. Subclasses must populate
media_class
,mature_class
anddeleted_class
fields.- BASE_URL = 'http://localhost:50280/'#
- REPORT_CHOICES = [('mature', 'mature'), ('dmca', 'dmca'), ('other', 'other')]#
- STATUS_CHOICES = [('pending_review', 'pending_review'), ('mature_filtered', 'mature_filtered'), ('deindexed', 'deindexed'), ('no_action', 'no_action')]#
- clean()#
Clean fields and raise errors that can be handled by Django Admin.
- created_at#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- deleted_class: type[django.db.models.base.Model] = None#
the class storing deleted media e.g.
DeletedImage
orDeletedAudio
- description#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- get_next_by_created_at(*, field=<django.db.models.fields.DateTimeField: created_at>, is_next=True, **kwargs)#
- get_previous_by_created_at(*, field=<django.db.models.fields.DateTimeField: created_at>, is_next=False, **kwargs)#
- get_reason_display(*, field=<django.db.models.fields.CharField: reason>)#
- get_status_display(*, field=<django.db.models.fields.CharField: status>)#
- mature_class: type[django.db.models.base.Model] = None#
the class storing mature media e.g.
MatureImage
orMatureAudio
- media_class: type[django.db.models.base.Model] = None#
the model class associated with this media type e.g.
Image
orAudio
- media_obj#
There can be many reports associated with a single media item, hence foreign key. Sub-classes must override this field to point to a concrete sub-class of
AbstractMedia
.
- media_obj_id#
- reason#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- save(*args, **kwargs)#
Save changes to the DB and sync them with Elasticsearch.
Extend the built-in
save()
functionality of Django with Elasticsearch integration to update records and refresh indices.Media marked as mature or deleted also leads to instantiation of their corresponding mature or deleted classes.
- status#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- url(media_type)#
catalog.api.models.mixins module#
- class catalog.api.models.mixins.FileMixin(*args, **kwargs)#
Bases:
Model
This mixin adds fields related to file such as the file URL and size to any model.
Do not use this as the sole base class.
This mixin adds
url: URLField
filesize: IntegerField
filetype: CharField
- filesize#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- filetype#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- property mime_type#
Get the MIME type of the file inferred from the extension of the file.
- Returns:
the inferred MIME type of the file
- property size_in_mbs#
- property size_in_mib#
- url#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- class catalog.api.models.mixins.ForeignIdentifierMixin(*args, **kwargs)#
Bases:
Model
This mixin adds fields related to the external unique ID to any model.
Do not use this as the sole base class.
This mixin adds
foreign_identifier: CharField
- foreign_identifier#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- class catalog.api.models.mixins.IdentifierMixin(*args, **kwargs)#
Bases:
Model
This mixin adds fields related to unique ID, both internal and external, to a model.
Do not use this as the sole base class.
The mixins adds
identifier: UUIDField
- identifier#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- class catalog.api.models.mixins.MediaMixin(*args, **kwargs)#
Bases:
Model
This mixin adds fields related to a creation such as the title and artist info.
Do not use this as the sole base class.
The mixin adds
title: CharField
foreign_landing_url: CharField
creator: CharField
creator_url: CharField
thumbnail: URLField
provider: CharField
- creator#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- creator_url#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- foreign_landing_url#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- provider#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- thumbnail#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- title#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
catalog.api.models.models module#
- class catalog.api.models.models.ContentProvider(*args, **kwargs)#
Bases:
Model
A content provider instance can only be mapped to a single media type.
For providers providing multiple media types, use different identifiers while keeping the same display name.
For example, - Wikimedia for audio can have
provider_identifier
as “wikimedia_audio” andprovider_name
as “Wikimedia”- Wikimedia for images can have
provider_identifier
as “wikimedia_images” or “wikimedia” andprovider_name
as “Wikimedia”
- exception DoesNotExist#
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned#
Bases:
MultipleObjectsReturned
- created_on#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- domain_name#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- filter_content#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- get_media_type_display(*, field=<django.db.models.fields.CharField: media_type>)#
- get_next_by_created_on(*, field=<django.db.models.fields.DateTimeField: created_on>, is_next=True, **kwargs)#
- get_previous_by_created_on(*, field=<django.db.models.fields.DateTimeField: created_on>, is_next=False, **kwargs)#
- id#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- media_type#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- notes#
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>#
- provider_identifier#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- provider_name#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- class catalog.api.models.models.Tag(id, created_on, updated_on, foreign_identifier, name, source, slug)#
Bases:
OpenLedgerModel
- exception DoesNotExist#
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned#
Bases:
MultipleObjectsReturned
- created_on#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- foreign_identifier#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- get_next_by_created_on(*, field=<django.db.models.fields.DateTimeField: created_on>, is_next=True, **kwargs)#
- get_next_by_updated_on(*, field=<django.db.models.fields.DateTimeField: updated_on>, is_next=True, **kwargs)#
- get_previous_by_created_on(*, field=<django.db.models.fields.DateTimeField: created_on>, is_next=False, **kwargs)#
- get_previous_by_updated_on(*, field=<django.db.models.fields.DateTimeField: updated_on>, is_next=False, **kwargs)#
- id#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- name#
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>#
- slug#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- source#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- updated_on#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
catalog.api.models.oauth module#
- class catalog.api.models.oauth.OAuth2Registration(*args, **kwargs)#
Bases:
Model
Information about API key applicants.
- exception DoesNotExist#
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned#
Bases:
MultipleObjectsReturned
- description#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- email#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- id#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- name#
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>#
- class catalog.api.models.oauth.OAuth2Verification(*args, **kwargs)#
Bases:
Model
An email verification code sent by noreply-catalog.
After verification occurs, the entry should be deleted.
- exception DoesNotExist#
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned#
Bases:
MultipleObjectsReturned
- associated_application#
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.parent
is aForwardManyToOneDescriptor
instance.
- associated_application_id#
- code#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- email#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- 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>#
- class catalog.api.models.oauth.ThrottledApplication(*args, **kwargs)#
Bases:
AbstractApplication
An OAuth2 application with adjustable rate limits.
- exception DoesNotExist#
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned#
Bases:
MultipleObjectsReturned
- RATE_LIMIT_MODELS = [('standard', 'standard'), ('enhanced', 'enhanced'), ('exempt', 'exempt')]#
- accesstoken_set#
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- algorithm#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- authorization_grant_type#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- client_id#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- client_secret#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- client_type#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- created#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- get_algorithm_display(*, field=<django.db.models.fields.CharField: algorithm>)#
- get_authorization_grant_type_display(*, field=<django.db.models.fields.CharField: authorization_grant_type>)#
- get_client_type_display(*, field=<django.db.models.fields.CharField: client_type>)#
- get_next_by_created(*, field=<django.db.models.fields.DateTimeField: created>, is_next=True, **kwargs)#
- get_next_by_updated(*, field=<django.db.models.fields.DateTimeField: updated>, is_next=True, **kwargs)#
- get_previous_by_created(*, field=<django.db.models.fields.DateTimeField: created>, is_next=False, **kwargs)#
- get_previous_by_updated(*, field=<django.db.models.fields.DateTimeField: updated>, is_next=False, **kwargs)#
- get_rate_limit_model_display(*, field=<django.db.models.fields.CharField: rate_limit_model>)#
- grant_set#
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- id#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- idtoken_set#
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- name#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- oauth2verification_set#
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- objects = <django.db.models.manager.Manager object>#
- rate_limit_model#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- redirect_uris#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- refreshtoken_set#
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- skip_authorization#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- updated#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- user#
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.parent
is aForwardManyToOneDescriptor
instance.
- user_id#
- verified#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.