journals.forms module

class journals.forms.PublicationSearchForm(*args, **kwargs)[source]

Bases: django.forms.forms.Form

Simple search form to filter a Publication queryset.

search_results()[source]

Return all public Publication objects fitting search criteria.

base_fields = {'author': <django.forms.fields.CharField object>, 'doi_label': <django.forms.fields.CharField object>, 'journal': <django.forms.models.ModelChoiceField object>, 'proceedings': <django.forms.models.ModelChoiceField object>, 'title': <django.forms.fields.CharField object>}
declared_fields = {'author': <django.forms.fields.CharField object>, 'doi_label': <django.forms.fields.CharField object>, 'journal': <django.forms.models.ModelChoiceField object>, 'proceedings': <django.forms.models.ModelChoiceField object>, 'title': <django.forms.fields.CharField object>}
property media
class journals.forms.CitationListBibitemsForm(*args, **kwargs)[source]

Bases: django.forms.models.ModelForm

class Meta[source]

Bases: object

model

alias of journals.models.publication.Publication

fields = ()
extract_dois()[source]
save(*args, **kwargs)[source]

Save this form’s self.instance object if commit=True. Otherwise, add a save_m2m() method to the form which can be called after the instance is saved manually at a later time. Return the model instance.

base_fields = {'latex_bibitems': <django.forms.fields.CharField object>}
declared_fields = {'latex_bibitems': <django.forms.fields.CharField object>}
property media
class journals.forms.AbstractJATSForm(*args, **kwargs)[source]

Bases: django.forms.models.ModelForm

class Meta[source]

Bases: object

model

alias of journals.models.publication.Publication

fields = ()
save(*args, **kwargs)[source]

Save this form’s self.instance object if commit=True. Otherwise, add a save_m2m() method to the form which can be called after the instance is saved manually at a later time. Return the model instance.

base_fields = {'abstract_jats': <django.forms.fields.CharField object>}
declared_fields = {'abstract_jats': <django.forms.fields.CharField object>}
property media
class journals.forms.FundingInfoForm(*args, **kwargs)[source]

Bases: django.forms.models.ModelForm

class Meta[source]

Bases: object

model

alias of journals.models.publication.Publication

fields = ()
save(*args, **kwargs)[source]

Save this form’s self.instance object if commit=True. Otherwise, add a save_m2m() method to the form which can be called after the instance is saved manually at a later time. Return the model instance.

base_fields = {'funding_statement': <django.forms.fields.CharField object>}
declared_fields = {'funding_statement': <django.forms.fields.CharField object>}
property media
class journals.forms.BasePublicationAuthorsTableFormSet(data=None, files=None, auto_id='id_%s', prefix=None, queryset=None, *, initial=None, **kwargs)[source]

Bases: django.forms.models.BaseModelFormSet

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

Save model instances for every form, adding and changing instances as necessary, and return the list of instances.

class journals.forms.AuthorsTableOrganizationSelectForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, instance=None, use_required_attribute=None, renderer=None)[source]

Bases: django.forms.models.ModelForm

class Meta[source]

Bases: object

model

alias of journals.models.publication.PublicationAuthorsTable

fields = []
base_fields = {'organization': <django.forms.models.ModelChoiceField object>}
declared_fields = {'organization': <django.forms.models.ModelChoiceField object>}
property media
class journals.forms.CreateMetadataXMLForm(*args, **kwargs)[source]

Bases: django.forms.models.ModelForm

class Meta[source]

Bases: object

model

alias of journals.models.publication.Publication

fields = ['metadata_xml']
save(*args, **kwargs)[source]

Save this form’s self.instance object if commit=True. Otherwise, add a save_m2m() method to the form which can be called after the instance is saved manually at a later time. Return the model instance.

new_xml(publication)[source]

Create new XML structure, return as a string.

base_fields = {'metadata_xml': <django.forms.fields.CharField object>}
declared_fields = {}
property media
class journals.forms.CreateMetadataDOAJForm(*args, **kwargs)[source]

Bases: django.forms.models.ModelForm

class Meta[source]

Bases: object

model

alias of journals.models.publication.Publication

fields = ['metadata_DOAJ']
generate(publication)[source]
base_fields = {'metadata_DOAJ': <django.forms.fields.JSONField object>}
declared_fields = {}
property media
class journals.forms.BaseReferenceFormSet(*args, **kwargs)[source]

Bases: django.forms.models.BaseModelFormSet

BaseReferenceFormSet is used to help fill the Reference list for Publications

It is required to add the required keyword argument publication to this FormSet.

initial_references = []
prefill()[source]
class journals.forms.ReferenceForm(*args, **kwargs)[source]

Bases: django.forms.models.ModelForm

class Meta[source]

Bases: object

model

alias of journals.models.publication.Reference

fields = ['reference_number', 'authors', 'citation', 'identifier', 'link']
save(*args, **kwargs)[source]

Save this form’s self.instance object if commit=True. Otherwise, add a save_m2m() method to the form which can be called after the instance is saved manually at a later time. Return the model instance.

base_fields = {'authors': <django.forms.fields.CharField object>, 'citation': <django.forms.fields.CharField object>, 'identifier': <django.forms.fields.CharField object>, 'link': <django.forms.fields.URLField object>, 'reference_number': <django.forms.fields.IntegerField object>}
declared_fields = {}
property media
class journals.forms.DraftPublicationForm(data=None, identifier_w_vn_nr=None, issue_id=None, *args, **kwargs)[source]

Bases: django.forms.models.ModelForm

This Form is used by the Production Supervisors to create a new Publication object and prefill all data. It is only able to create a draft version of a Publication object.

class Meta[source]

Bases: object

model

alias of journals.models.publication.Publication

fields = ['doi_label', 'pdf_file', 'in_issue', 'paper_nr', 'title', 'author_list', 'abstract', 'acad_field', 'specialties', 'approaches', 'cc_license', 'BiBTeX_entry', 'submission_date', 'acceptance_date', 'publication_date']
get_possible_issues()[source]
delete_secondary_fields()[source]

Delete fields from the self.fields dictionary. Later on, this submitted sparse form can be used to prefill these secondary fields.

clean()[source]

Hook for doing any extra form-wide cleaning after Field.clean() has been called on every field. Any ValidationError raised by this method will not be associated with a particular field; it will have a special-case association with the field named ‘__all__’.

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

Save the Publication object always as a draft and prefill the Publication with related Submission data only when appending the Publication.

first_time_fill()[source]

Take over fields from related Submission object. This can only be done after the Publication object has been added to the database due to m2m relations.

prefill_fields()[source]
prefill_with_issue(issue)[source]
prefill_with_journal(journal)[source]
base_fields = {'BiBTeX_entry': <django.forms.fields.CharField object>, 'abstract': <django.forms.fields.CharField object>, 'acad_field': <django.forms.models.ModelChoiceField object>, 'acceptance_date': <django.forms.fields.DateField object>, 'approaches': <django.forms.fields.MultipleChoiceField object>, 'author_list': <django.forms.fields.CharField object>, 'cc_license': <django.forms.fields.TypedChoiceField object>, 'doi_label': <django.forms.fields.CharField object>, 'in_issue': <django.forms.models.ModelChoiceField object>, 'paper_nr': <django.forms.fields.IntegerField object>, 'pdf_file': <django.forms.fields.FileField object>, 'publication_date': <django.forms.fields.DateField object>, 'specialties': <django.forms.models.ModelMultipleChoiceField object>, 'submission_date': <django.forms.fields.DateField object>, 'title': <django.forms.fields.CharField object>}
declared_fields = {}
property media
class journals.forms.DraftPublicationApprovalForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, instance=None, use_required_attribute=None, renderer=None)[source]

Bases: django.forms.models.ModelForm

class Meta[source]

Bases: object

model

alias of journals.models.publication.Publication

fields = ()
save(commit=True)[source]

Save this form’s self.instance object if commit=True. Otherwise, add a save_m2m() method to the form which can be called after the instance is saved manually at a later time. Return the model instance.

base_fields = {}
declared_fields = {}
property media
class journals.forms.PublicationGrantsForm(*args, **kwargs)[source]

Bases: django.forms.models.ModelForm

class Meta[source]

Bases: object

model

alias of journals.models.publication.Publication

fields = []
save(commit=True)[source]

Save this form’s self.instance object if commit=True. Otherwise, add a save_m2m() method to the form which can be called after the instance is saved manually at a later time. Return the model instance.

base_fields = {'grant': <django.forms.models.ModelChoiceField object>}
declared_fields = {'grant': <django.forms.models.ModelChoiceField object>}
property media
class journals.forms.PublicationPublishForm(*args, **kwargs)[source]

Bases: scipost.forms.RequestFormMixin, django.forms.models.ModelForm

class Meta[source]

Bases: object

model

alias of journals.models.publication.Publication

fields = []
move_pdf()[source]

To keep the Publication pdfs organized we move the pdfs to their own folder organized by journal and optional issue folder.

update_submission()[source]
update_stream()[source]
save(commit=True)[source]

Save this form’s self.instance object if commit=True. Otherwise, add a save_m2m() method to the form which can be called after the instance is saved manually at a later time. Return the model instance.

base_fields = {}
declared_fields = {}
property media
class journals.forms.VolumeForm(*args, **kwargs)[source]

Bases: django.forms.models.ModelForm

Add or Update a Volume instance which is directly related to either a Journal.

class Meta[source]

Bases: object

model

alias of journals.models.volume.Volume

fields = ('in_journal', 'start_date', 'until_date', 'doi_label')
save()[source]

Save this form’s self.instance object if commit=True. Otherwise, add a save_m2m() method to the form which can be called after the instance is saved manually at a later time. Return the model instance.

base_fields = {'doi_label': <django.forms.fields.CharField object>, 'in_journal': <django.forms.models.ModelChoiceField object>, 'start_date': <django.forms.fields.DateField object>, 'until_date': <django.forms.fields.DateField object>}
declared_fields = {}
property media
class journals.forms.IssueForm(*args, **kwargs)[source]

Bases: django.forms.models.ModelForm

Add or Update an Issue instance which is directly related to either a Journal or a Volume.

class Meta[source]

Bases: object

model

alias of journals.models.issue.Issue

fields = ('in_journal', 'in_volume', 'start_date', 'until_date', 'status', 'doi_label')
save()[source]

Save this form’s self.instance object if commit=True. Otherwise, add a save_m2m() method to the form which can be called after the instance is saved manually at a later time. Return the model instance.

base_fields = {'doi_label': <django.forms.fields.CharField object>, 'in_journal': <django.forms.models.ModelChoiceField object>, 'in_volume': <django.forms.models.ModelChoiceField object>, 'start_date': <django.forms.fields.DateField object>, 'status': <django.forms.fields.TypedChoiceField object>, 'until_date': <django.forms.fields.DateField object>}
declared_fields = {}
property media
class journals.forms.SetOrgPubFractionForm(*args, **kwargs)[source]

Bases: django.forms.models.ModelForm

class Meta[source]

Bases: object

model

alias of journals.models.publication.OrgPubFraction

fields = ['organization', 'publication', 'fraction']
base_fields = {'fraction': <django.forms.fields.DecimalField object>, 'organization': <django.forms.models.ModelChoiceField object>, 'publication': <django.forms.models.ModelChoiceField object>}
declared_fields = {}
property media
class journals.forms.BaseOrgPubFractionsFormSet(data=None, files=None, auto_id='id_%s', prefix=None, queryset=None, *, initial=None, **kwargs)[source]

Bases: django.forms.models.BaseModelFormSet

clean()[source]

Checks that the fractions add up to one.

class journals.forms.PublicationDynSelForm(*args, **kwargs)[source]

Bases: django.forms.forms.Form

base_fields = {'action_target_element_id': <django.forms.fields.CharField object>, 'action_url_base_kwargs': <django.forms.fields.JSONField object>, 'action_url_name': <django.forms.fields.CharField object>, 'q': <django.forms.fields.CharField object>}
declared_fields = {'action_target_element_id': <django.forms.fields.CharField object>, 'action_url_base_kwargs': <django.forms.fields.JSONField object>, 'action_url_name': <django.forms.fields.CharField object>, 'q': <django.forms.fields.CharField object>}
property media
search_results()[source]