preprints.models module¶
-
class
preprints.models.
Preprint
(*args, **kwargs)[source]¶ Bases:
django.db.models.base.Model
A preprint object, either at SciPost or with link to external preprint server.
If the instance is a SciPost preprint, the _file field should be filled.
-
identifier_w_vn_nr
¶ 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.
-
modified
¶ 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_document
()[source]¶ Retrieve the preprint document itself, calling preprint server if necessary.
-
property
citation_pdf_url
¶ Return the absolute URL of the pdf for the meta tag for Google Scholar.
-
property
has_file
¶
-
property
is_arXiv
¶ Return True if this preprint is hosted on arXiv.
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
get_next_by_created
(*, field=<django.db.models.fields.DateTimeField: created>, is_next=True, **kwargs)¶
-
get_next_by_modified
(*, field=<django.db.models.fields.DateTimeField: modified>, is_next=True, **kwargs)¶
-
get_previous_by_created
(*, field=<django.db.models.fields.DateTimeField: created>, is_next=False, **kwargs)¶
-
get_previous_by_modified
(*, field=<django.db.models.fields.DateTimeField: modified>, 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>¶
-
submission
¶ 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.
-