Section

class database.models.Section(*args, **kwargs)

Bases: database.mixins.file_and_source_info_mixin.FileAndSourceInfoMixin, database.mixins.contribution_info_mixin.ContributionInfoMixin, database.models.custom_base_model.CustomBaseModel

A component of a Musical Work e.g. an Aria in an Opera

Can alternatively be a Musical Work in its entirety, in which case the Musical Work has a single trivial Section that represents the whole work. A purely abstract entity that can be manifested in differing versions. Divided into one or more Parts. A Section can be divided into more Sections. Must have at least one part.

title

models.CharField – The title of this section

musical_work

models.ForeignKey – Reference to the MusicalWork of which this Section is part. A Section must reference a MusicalWork even if it has parent Sections.

ordering

models.PositiveIntegerField – A number representing the position of this section within a MusicalWork

parent_sections

models.ManyToManyField – Sections that contain this Section.

s.child_sections

models.ManyToManyField – Sections that are sub-Sections of this Section

s.related_sections

models.ManyToManyField – Sections that are related to this Section (i.e. derived from it, or the same music but used in a different MusicalWork)

s.parts

models.ManyToOne – The Parts that belong to this Section

sources

models.ManyToMany – The Sources that manifest this Section

contributions

models.ManyToOne – The Contributions of this Section

Attributes Summary

child_sections Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
contributions Accessor to the related objects manager on the reverse side of a many-to-one relation.
id A wrapper for a deferred-loading field.
instrumentation Gets all the Instruments used in this Section
is_leaf Check if Section has no children but has parents
is_node Check if Section has both children and parents
is_root Check if Section has no parents but has children
is_single Check if Section has no children and no parents
musical_work Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
musical_work_id A wrapper for a deferred-loading field.
objects
ordering A wrapper for a deferred-loading field.
parent_sections Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
parts Accessor to the related objects manager on the reverse side of a many-to-one relation.
related_sections Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
source_instantiations Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
title A wrapper for a deferred-loading field.

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

child_sections

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 and Topping.pizzas are ManyToManyDescriptor instances.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

contributions

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 a ReverseManyToOneDescriptor 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.

instrumentation

Gets all the Instruments used in this Section

is_leaf

Check if Section has no children but has parents

is_node

Check if Section has both children and parents

is_root

Check if Section has no parents but has children

is_single

Check if Section has no children and no parents

musical_work

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 a ForwardManyToOneDescriptor instance.

musical_work_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>
ordering

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

parent_sections

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 and Topping.pizzas are ManyToManyDescriptor instances.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

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.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

related_sections

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 and Topping.pizzas are ManyToManyDescriptor instances.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

source_instantiations

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 and Topping.pizzas are ManyToManyDescriptor instances.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

title

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

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)