journals.views module

class journals.views.PublicationAutocompleteView(**kwargs)[source]

Bases: dal_select2.views.Select2QuerySetView

View to feed the Select2 widget.

get_queryset()[source]

Filter the queryset with GET[‘q’].

get_result_label(item)[source]

Return the label of a result.

journals.views.doi_dispatch(request, journal_tag, part_1=None, part_2=None, part_3=None)[source]

Dispatch given DOI route to the appropriate view according to the Journal’s settings.

journal_tag – Part of the DOI right before the first period.

  • part_1 (optional) – Part of the DOI after the first period.

  • part_2 (optional) – Part of the DOI after the second period.

  • part_3 (optional) – Part of the DOI after the third period.

class journals.views.JournalListView(**kwargs)[source]

Bases: django.views.generic.list.ListView

model

alias of journals.models.journal.Journal

get_queryset()[source]

Return the list of items for this view.

The return value must be an iterable and may be an instance of QuerySet in which case QuerySet specific behavior will be enabled.

get_context_data(*args, **kwargs)[source]

Get the context for this view.

class journals.views.PublicationListView(**kwargs)[source]

Bases: scipost.mixins.PaginationMixin, django.views.generic.list.ListView

Show Publications filtered per specialty.

paginate_by = 10
get_queryset()[source]

Return the list of items for this view.

The return value must be an iterable and may be an instance of QuerySet in which case QuerySet specific behavior will be enabled.

get_context_data(**kwargs)[source]

Get the context for this view.

journals.views.landing_page(request, doi_label)[source]

Journal details page.

The landing page of a Journal lists either the latest and the current issue of a Journal or paginates its individual Publications.

class journals.views.VolumesAdminListView(**kwargs)[source]

Bases: scipost.mixins.PermissionsMixin, scipost.mixins.PaginationMixin, django.views.generic.list.ListView

Admin: List all Volumes in the database.

model

alias of journals.models.volume.Volume

permission_required = 'scipost.can_manage_issues'
paginate_by = 20
class journals.views.VolumesAdminAddView(**kwargs)[source]

Bases: scipost.mixins.PermissionsMixin, django.views.generic.edit.CreateView

Admin: Create new Volume.

model

alias of journals.models.volume.Volume

form_class

alias of journals.forms.VolumeForm

success_url = '/journals/admin/volumes/'
permission_required = 'scipost.can_manage_issues'
class journals.views.VolumesAdminUpdateView(**kwargs)[source]

Bases: scipost.mixins.PermissionsMixin, django.views.generic.edit.UpdateView

Admin: Update Volume instance.

model

alias of journals.models.volume.Volume

form_class

alias of journals.forms.VolumeForm

slug_field = 'doi_label'
slug_url_kwarg = 'doi_label'
success_url = '/journals/admin/volumes/'
permission_required = 'scipost.can_manage_issues'
class journals.views.IssuesView(**kwargs)[source]

Bases: django.views.generic.detail.DetailView

List all Issues sorted per Journal.

slug_field = 'doi_label'
slug_url_kwarg = 'doi_label'
template_name = 'journals/journal_issues.html'
class journals.views.IssuesAdminListView(**kwargs)[source]

Bases: scipost.mixins.PermissionsMixin, scipost.mixins.PaginationMixin, django.views.generic.list.ListView

Admin: List all Issues in the database.

model

alias of journals.models.issue.Issue

permission_required = 'scipost.can_manage_issues'
paginate_by = 20
class journals.views.IssuesAdminAddView(**kwargs)[source]

Bases: scipost.mixins.PermissionsMixin, django.views.generic.edit.CreateView

Admin: Create new Issue.

model

alias of journals.models.issue.Issue

form_class

alias of journals.forms.IssueForm

success_url = '/journals/admin/issues/'
permission_required = 'scipost.can_manage_issues'
class journals.views.IssuesAdminUpdateView(**kwargs)[source]

Bases: scipost.mixins.PermissionsMixin, django.views.generic.edit.UpdateView

Admin: Update issue instance.

model

alias of journals.models.issue.Issue

form_class

alias of journals.forms.IssueForm

slug_field = 'doi_label'
slug_url_kwarg = 'doi_label'
success_url = '/journals/admin/issues/'
permission_required = 'scipost.can_manage_issues'
journals.views.authoring(request, doi_label=None)[source]

Author information for a given Journal, or in general if no doi_label in given.

journals.views.refereeing(request, doi_label=None)[source]

Author information for a given Journal, or in general if no doi_label in given.

journals.views.redirect_to_about(request, doi_label)[source]
journals.views.about(request, doi_label)[source]

Journal specific about page.

journals.views.provide_plot(x, y, name, nonce=None)[source]
journals.views.metrics(request, doi_label, specialty=None)[source]
journals.views.issue_detail(request, doi_label)[source]

Issue detail page.

class journals.views.PublicationGrantsView(**kwargs)[source]

Bases: scipost.mixins.PermissionsMixin, django.views.generic.edit.UpdateView

Add/update grants associated to a Publication.

permission_required = 'scipost.can_draft_publication'
slug_field = 'doi_label'
slug_url_kwarg = 'doi_label'
form_class

alias of journals.forms.PublicationGrantsForm

template_name = 'journals/grants_form.html'
class journals.views.PublicationGrantsRemovalView(**kwargs)[source]

Bases: scipost.mixins.PermissionsMixin, django.views.generic.detail.DetailView

Remove grant associated to a Publication.

permission_required = 'scipost.can_draft_publication'
slug_field = 'doi_label'
slug_url_kwarg = 'doi_label'
get(request, *args, **kwargs)[source]
journals.views.publication_authors_ordering(request, doi_label)[source]
class journals.views.DraftPublicationUpdateView(**kwargs)[source]

Bases: scipost.mixins.PermissionsMixin, django.views.generic.edit.UpdateView

Any Production Officer or Administrator can draft a new publication without publishing here. The actual publishing is done at a later stage, after the draft has been finished.

permission_required = 'scipost.can_draft_publication'
slug_url_kwarg = 'identifier_w_vn_nr'
slug_field = 'accepted_submission__preprint__identifier_w_vn_nr'
form_class

alias of journals.forms.DraftPublicationForm

template_name = 'journals/publication_form.html'
get_object(queryset=None)[source]

Return the object the view is displaying.

Require self.queryset and a pk or slug argument in the URLconf. Subclasses can override this to return any object.

get_form_kwargs()[source]

Return the keyword arguments for instantiating the form.

class journals.views.DraftPublicationApprovalView(**kwargs)[source]

Bases: scipost.mixins.PermissionsMixin, django.views.generic.edit.UpdateView

permission_required = 'scipost.can_draft_publication'
slug_field = 'doi_label'
slug_url_kwarg = 'doi_label'
form_class

alias of journals.forms.DraftPublicationApprovalForm

template_name = 'journals/publication_approval_form.html'
class journals.views.PublicationPublishView(**kwargs)[source]

Bases: scipost.mixins.PermissionsMixin, scipost.mixins.RequestViewMixin, django.views.generic.edit.UpdateView

permission_required = 'scipost.can_publish_accepted_submission'
slug_field = 'doi_label'
slug_url_kwarg = 'doi_label'
form_class

alias of journals.forms.PublicationPublishForm

template_name = 'journals/publication_publish_form.html'
dispatch(request, *args, **kwargs)
journals.views.manage_metadata(request, doi_label=None)[source]
journals.views.add_author(request, doi_label)[source]

Link authors (via their Profile) to a Publication.

To be used for registered Contributors who have not claimed authorship, as well as for unregistered authors.

This is important for the Crossref metadata, in which all authors must appear.

class journals.views.AuthorAffiliationView(**kwargs)[source]

Bases: journals.mixins.PublicationMixin, scipost.mixins.PermissionsMixin, django.views.generic.detail.DetailView

Handle the author affiliations for a Publication.

permission_required = 'scipost.can_draft_publication'
template_name = 'journals/author_affiliations.html'
get_context_data(**kwargs)[source]

Insert the single object into the context dict.

journals.views.add_affiliation(request, doi_label, pk)[source]

Adds an affiliation to a PublicationAuthorsTable.

journals.views.remove_affiliation(request, doi_label, pk, organization_id)[source]

Remove an affiliation in a PublicationAuthorsTable.

journals.views.update_references(request, doi_label)[source]

Update the References for a certain Publication.

class journals.views.CitationUpdateView(**kwargs)[source]

Bases: journals.mixins.PublicationMixin, journals.mixins.ProdSupervisorPublicationPermissionMixin, django.views.generic.edit.UpdateView

Populates the citation_list dictionary entry in the metadata field in a Publication instance.

form_class

alias of journals.forms.CitationListBibitemsForm

template_name = 'journals/create_citation_list_metadata.html'
get_success_url()[source]

Return the URL to redirect to after processing a valid form.

class journals.views.AbstractJATSUpdateView(**kwargs)[source]

Bases: journals.mixins.PublicationMixin, journals.mixins.ProdSupervisorPublicationPermissionMixin, django.views.generic.edit.UpdateView

Add or update the JATS version of the abstract. This should be produced separately using pandoc.

form_class

alias of journals.forms.AbstractJATSForm

template_name = 'journals/create_abstract_jats.html'
get_success_url()[source]

Return the URL to redirect to after processing a valid form.

class journals.views.FundingInfoView(**kwargs)[source]

Bases: journals.mixins.PublicationMixin, journals.mixins.ProdSupervisorPublicationPermissionMixin, django.views.generic.edit.UpdateView

Add/update funding statement to the xml_metadata

form_class

alias of journals.forms.FundingInfoForm

template_name = 'journals/create_funding_info_metadata.html'
get_success_url()[source]

Return the URL to redirect to after processing a valid form.

journals.views.add_associated_grant(request, doi_label)[source]

Called by an Editorial Administrator. This associates a grant from the database to this publication.

journals.views.add_generic_funder(request, doi_label)[source]

Called by an Editorial Administrator. This associates a funder (generic, not via grant) from the database to this publication.

class journals.views.CreateMetadataXMLView(**kwargs)[source]

Bases: journals.mixins.PublicationMixin, journals.mixins.ProdSupervisorPublicationPermissionMixin, django.views.generic.edit.UpdateView

To be called by an EdAdmin (or Production Supervisor) after the authors, author ordering, affiliations, citation_list, funding_info entries have been filled. Populates the metadata_xml field of a Publication instance. The contents can then be sent to Crossref for registration.

form_class

alias of journals.forms.CreateMetadataXMLForm

template_name = 'journals/create_metadata_xml.html'
get_success_url()[source]

Return the URL to redirect to after processing a valid form.

journals.views.metadata_xml_deposit(request, doi_label, option='test')[source]

Crossref metadata deposit. If test==True, test the metadata_xml using the Crossref test server. Makes use of the python requests module.

journals.views.mark_deposit_success(request, deposit_id, success)[source]
journals.views.produce_metadata_DOAJ(request, doi_label)[source]
journals.views.metadata_DOAJ_deposit(request, doi_label)[source]

DOAJ metadata deposit. Makes use of the python requests module.

journals.views.publication_add_topic(request, doi_label)[source]

Add a predefined Topic to an existing Publication object. This also adds the Topic to all Submissions of this Publication.

journals.views.publication_remove_topic(request, doi_label, slug)[source]

Remove the Topic from the Publication, and from all associated Submissions.

journals.views.allocate_orgpubfractions(request, doi_label)[source]

Set the relative support obtained from Organizations for the research contained in a Publication.

This view is accessible to EdAdmin as well as to the corresponding author of the Publication.

journals.views.request_pubfrac_check(request, doi_label)[source]

This view is used by EdAdmin to request confirmation of the OrgPubFractions for a given Publication.

This occurs post-publication, after all the affiliations and funders have been confirmed.

journals.views.mark_doaj_deposit_success(request, deposit_id, success)[source]
journals.views.harvest_citedby_list(request)[source]
journals.views.sign_existing_report(request, report_id)[source]

Allows the author of a Report, originally submitted anonymously, to sign the Report.

journals.views.manage_report_metadata(request)[source]

This page offers Editorial Administrators tools for managing the metadata of Reports.

journals.views.manage_comment_metadata(request)[source]

This page offers Editorial Administrators tools for managing the metadata of Comments.

journals.views.manage_update_metadata(request)[source]

This page offers Editorial Administrators tools for managing the metadata of PublicationUpdates.

journals.views.mark_report_doi_needed(request, report_id, needed)[source]
journals.views.mark_comment_doi_needed(request, comment_id, needed)[source]
journals.views.generic_metadata_xml_deposit(request, **kwargs)[source]

Handle generic non-Publication metadata deposits at Crossref.

Types of objects handled:

  • Reports

  • Comments

  • PublicationUpdates

The metadata is created and immediately deposited at Crossref.

For Reports and Comments, if there exists a relation to a SciPost-published object, the deposit uses Crossref’s peer review content type. Otherwise the deposit is done as a dataset.

For PublicationUpdates, the deposit type is journal_article and the journal is used as container.

journals.views.mark_generic_deposit_success(request, deposit_id, success)[source]
journals.views.email_object_made_citable(request, **kwargs)[source]

This method sends an email to the author of a Report or a Comment, to notify that the object has been made citable (doi registered).

journals.views.report_detail(request, doi_label)[source]
journals.views.comment_detail(request, doi_label)[source]
journals.views.author_reply_detail(request, doi_label)[source]
journals.views.publication_detail(request, doi_label)[source]

The actual Publication detail page. This is visible for everyone if published or visible for Production Supervisors and Administrators if in draft.

journals.views.publication_detail_pdf(request, doi_label)[source]

The actual Publication pdf. This is visible for everyone if published or visible for Production Supervisors and Administrators if in draft.

journals.views.publication_update_detail(request, doi_label, update_nr)[source]

Detail page for a PublicationUpdate.

journals.views.arxiv_doi_feed(request, doi_label)[source]

This method provides arXiv with the doi and journal ref of the 100 most recent publications in the journal specified by doi_label.