SciPost Code Repository

Skip to content
Snippets Groups Projects
Commit 36c4bcad authored by Jean-Sébastien Caux's avatar Jean-Sébastien Caux
Browse files

Add submission_insert field of journals.Journal

parent be04257b
No related branches found
No related tags found
No related merge requests found
......@@ -2,13 +2,24 @@ __copyright__ = "Copyright © Stichting SciPost (SciPost Foundation)"
__license__ = "AGPL v3"
from journals.models import Journal
from django.db.utils import ProgrammingError
def get_journal_doi_label_converter_regex():
"""
Helper function to prevent migrations from crashing.
"""
from journals.models import Journal
try:
return '|'.join([j.doi_label for j in Journal.objects.all()])
except ProgrammingError:
return 'SciPostPhys'
class JournalDOILabelConverter:
regex = '|'.join([j.doi_label for j in Journal.objects.all()])
regex = get_journal_doi_label_converter_regex()
def to_python(self, value):
from journals.models import Journal
try:
return Journal.objects.get(doi_label=value).doi_label
except Journal.DoesNotExist:
......
# Generated by Django 2.2.16 on 2020-10-26 20:17
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('journals', '0102_auto_20200930_0602'),
]
operations = [
migrations.AddField(
model_name='journal',
name='submission_insert',
field=models.TextField(blank=True, default='[Optional; you can use markup]', null=True),
),
]
# Generated by Django 2.2.16 on 2020-10-26 20:44
import django.core.validators
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('journals', '0103_journal_submission_insert'),
]
operations = [
migrations.AlterField(
model_name='issue',
name='doi_label',
field=models.CharField(db_index=True, max_length=200, unique=True, validators=[django.core.validators.RegexValidator('^((SciPost)[a-zA-Z]+|(MigPol))\\.\\w+(\\.[0-9]+)?$', 'Only expressions with regex ((SciPost)[a-zA-Z]+|(MigPol))\\.\\w+(\\.[0-9]+)? are allowed.')]),
),
migrations.AlterField(
model_name='journal',
name='doi_label',
field=models.CharField(db_index=True, max_length=200, unique=True, validators=[django.core.validators.RegexValidator('^(SciPost)[a-zA-Z]+|(MigPol)$', 'Only expressions with regex (SciPost)[a-zA-Z]+|(MigPol) are allowed.')]),
),
migrations.AlterField(
model_name='publication',
name='doi_label',
field=models.CharField(db_index=True, max_length=200, unique=True, validators=[django.core.validators.RegexValidator('^((SciPost)[a-zA-Z]+|(MigPol))(\\.\\w+(\\.[0-9]+(\\.[0-9]{3,})?)?)?$', 'Only expressions with regex ((SciPost)[a-zA-Z]+|(MigPol))(\\.\\w+(\\.[0-9]+(\\.[0-9]{3,})?)?)? are allowed.')]),
),
migrations.AlterField(
model_name='volume',
name='doi_label',
field=models.CharField(db_index=True, max_length=200, unique=True, validators=[django.core.validators.RegexValidator('^((SciPost)[a-zA-Z]+|(MigPol)\\.\\w)$', 'Only expressions with regex ((SciPost)[a-zA-Z]+|(MigPol)\\.\\w) are allowed.')]),
),
]
......@@ -70,6 +70,8 @@ class Journal(models.Model):
scope = models.TextField(default='[To be filled in; you can use markup]')
content = models.TextField(default='[To be filled in; you can use markup]')
acceptance_criteria = models.TextField(default='[To be filled in; you can use markup]')
submission_insert = models.TextField(blank=True, null=True,
default='[Optional; you can use markup]')
minimal_nr_of_reports = models.PositiveSmallIntegerField(
help_text=('Minimal number of substantial Reports required '
'before an acceptance motion can be formulated'),
......
......@@ -2,7 +2,7 @@ __copyright__ = "Copyright © Stichting SciPost (SciPost Foundation)"
__license__ = "AGPL v3"
JOURNAL_DOI_LABEL_REGEX = r'(SciPost|MigPol)[a-zA-Z]+'
JOURNAL_DOI_LABEL_REGEX = r'(SciPost)[a-zA-Z]+|(MigPol)'
VOLUME_DOI_LABEL_REGEX = r'({}\.\w)'.format(JOURNAL_DOI_LABEL_REGEX)
......
......@@ -84,7 +84,8 @@
<h2 class="highlight" id="sub_and_ed">
Submission and Editorial Process
</h2>
<p>Authors should follow the <a href="{% url 'journal:authoring' doi_label=journal.doi_label %}">authoring guidelines</a> to ensure seamless processing of their manuscript. The <a href="{% url 'journals:journals_terms_and_conditions' %}">SciPost Journals Terms and Conditions</a> apply to all Submissions to SciPost Physics.</p>
{{ journal.submission_insert|automarkup }}
<p>Authors should follow the <a href="{% url 'journal:authoring' doi_label=journal.doi_label %}">authoring guidelines</a> to ensure seamless processing of their manuscript. The <a href="{% url 'journals:journals_terms_and_conditions' %}">SciPost Journals Terms and Conditions</a> apply to all Submissions to {{ journal }}.</p>
<p>All incoming Submissions are thoroughly checked for plagiarism, and follow the peer-witnessed refereeing procedures outlined in <a href="{% url 'submissions:sub_and_ref_procedure' %}">Submission and Refereeing procedure</a>.</p>
{% if journal.minimal_nr_of_reports > 0 %}
<p><strong>Minimal number of reports</strong>: at least {{ journal.minimal_nr_of_reports }} substantial report{{ journal.minimal_nr_of_reports|pluralize }} must have been received; all points raised must have been addressed either in resubmissions or in author replies before a recommendation for publication can be formulated.</p>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment