Archive¶
-
class
database.models.Archive(*args, **kwargs)¶ Bases:
database.models.custom_base_model.CustomBaseModelA location where Collections of Sources are stored.
e.g: A database or a library.
Can belong to an Institution.
-
name¶ models.CharField – The name of the archive.
-
collections¶ models.ManyToManyField – References to CollectionsOfSources contained by this Archive.
-
institution¶ models.ForeignKey – Reference to the Institution this Archive is part of.
See also
database.models.CustomBaseModel,database.models.CollectionsOfSources,database.models.InstitutionAttributes Summary
collectionsAccessor to the related objects manager on the forward and reverse sides of a many-to-many relation. idA wrapper for a deferred-loading field. institutionAccessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation. institution_idA wrapper for a deferred-loading field. nameA wrapper for a deferred-loading field. objectsMethods 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
-
collections 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.
-
id¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
institution 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.
-
institution_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>¶
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)¶
-