From 9ccfd3d07c1fad986afcff6566cf5e928951c09a Mon Sep 17 00:00:00 2001 From: Jorran de Wit <jorrandewit@outlook.com> Date: Wed, 1 Nov 2017 10:28:20 +0100 Subject: [PATCH] Make journal.issn blank=true --- .../migrations/0048_auto_20171101_1028.py | 20 +++++++++++++++++++ journals/models.py | 2 +- journals/templates/journals/_base.html | 2 +- 3 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 journals/migrations/0048_auto_20171101_1028.py diff --git a/journals/migrations/0048_auto_20171101_1028.py b/journals/migrations/0048_auto_20171101_1028.py new file mode 100644 index 000000000..e37643729 --- /dev/null +++ b/journals/migrations/0048_auto_20171101_1028.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.4 on 2017-11-01 09:28 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('journals', '0047_auto_20171101_0944'), + ] + + operations = [ + migrations.AlterField( + model_name='journal', + name='issn', + field=models.CharField(blank=True, default='2542-4653', max_length=16), + ), + ] diff --git a/journals/models.py b/journals/models.py index 50ed3c768..c226cfb25 100644 --- a/journals/models.py +++ b/journals/models.py @@ -33,7 +33,7 @@ class Journal(models.Model): name = models.CharField(max_length=100, choices=SCIPOST_JOURNALS, unique=True) doi_label = models.CharField(max_length=200, unique=True, db_index=True, validators=[doi_journal_validator]) - issn = models.CharField(max_length=16, default='2542-4653') + issn = models.CharField(max_length=16, default='2542-4653', blank=True) active = models.BooleanField(default=True) objects = JournalManager() diff --git a/journals/templates/journals/_base.html b/journals/templates/journals/_base.html index 7dc0f9ba3..418f4fd5f 100644 --- a/journals/templates/journals/_base.html +++ b/journals/templates/journals/_base.html @@ -50,7 +50,7 @@ <div class="row my-1"> <div class="col-12"> {% if journal.active %} - <p>{{journal}} is published by the SciPost Foundation under the journal doi: 10.21468/{{journal.name}} and ISSN {{journal.issn}}.</p> + <p>{{journal}} is published by the SciPost Foundation under the journal doi: 10.21468/{{journal.name}}{% if journal.issn %} and ISSN {{journal.issn}}{% endif %}.</p> {% endif %} {% if journal.doi_label == 'SciPostPhys' %} <p>SciPost Physics has been awarded the DOAJ Seal <img src="{% static 'scipost/images/DOAJ_Seal_logo_big.png' %}" alt="DOAJ Seal" width="40"> from the <a href="https://doaj.org">Directory of Open Access Journals</a></p> -- GitLab