journals.models.deposits module¶
-
class
journals.models.deposits.
Deposit
(*args, **kwargs)[source]¶ Bases:
django.db.models.base.Model
Each time a Crossref deposit is made for a Publication, a Deposit object instance is created containing the Publication’s current version of the metadata_xml field. All deposit history is thus contained here.
-
publication
¶ 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.
-
timestamp
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
doi_batch_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
metadata_xml
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
metadata_xml_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') as f: ... instance.file = File(f)
-
deposition_date
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
response_text
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
deposit_successful
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
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>¶
-
publication_id
¶
-
-
class
journals.models.deposits.
DOAJDeposit
(*args, **kwargs)[source]¶ Bases:
django.db.models.base.Model
For the Directory of Open Access Journals.
-
publication
¶ 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.
-
timestamp
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
metadata_DOAJ
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
metadata_DOAJ_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') as f: ... instance.file = File(f)
-
deposition_date
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
response_text
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
deposit_successful
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
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>¶
-
publication_id
¶
-
-
class
journals.models.deposits.
GenericDOIDeposit
(*args, **kwargs)[source]¶ Bases:
django.db.models.base.Model
Instances of this class represent Crossref deposits for non-publication objects such as Reports, Comments etc.
-
content_type
¶ 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.
-
object_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
content_object
¶ Provide a generic many-to-one relation through the
content_type
andobject_id
fields.This class also doubles as an accessor to the related object (similar to ForwardManyToOneDescriptor) by adding itself as a model attribute.
-
timestamp
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
doi_batch_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
metadata_xml
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
deposition_date
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
response
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
deposit_successful
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
content_type_id
¶
-
genericdoideposit
¶ 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.
-
objects
= <django.db.models.manager.Manager object>¶
-