Instrument¶
-
class
database.models.Instrument(*args, **kwargs)¶ Bases:
database.models.custom_base_model.CustomBaseModelAn instrument or voice
A part is written for an instrument or voice, and a symbolic music file can specify which instrument or voices it contains
-
name¶ models.CharField – The name of this Instrument
-
parts¶ models.ManyToOneRel – References to Parts that use this Instrument
-
sym_files¶ models.ManyToManyRel – References to SymbolicMusicFiles that specify this Instrument
Attributes Summary
idA wrapper for a deferred-loading field. musical_worksGet all the MusicalWorks that use this Instrument. nameA wrapper for a deferred-loading field. objectspartsAccessor to the related objects manager on the reverse side of a many-to-one relation. sectionsGet all the Sections that use this Instrument. sym_filesAccessor to the related objects manager on the forward and reverse sides of a many-to-many 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
-
id¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
musical_works¶ Get all the MusicalWorks that use this Instrument.
-
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>¶
-
parts 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.childrenis aReverseManyToOneDescriptorinstance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
-
sections¶ Get all the Sections that use this Instrument.
-
sym_files 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.toppingsandTopping.pizzasareManyToManyDescriptorinstances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
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)¶
-