SciPost Code Repository

Skip to content
Snippets Groups Projects
Commit 047ba49c authored by Jorran de Wit's avatar Jorran de Wit
Browse files

Add event suffix

parent e80dc6e6
No related branches found
No related tags found
No related merge requests found
# -*- coding: utf-8 -*-
# Generated by Django 1.11.4 on 2017-11-01 08:44
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('journals', '0046_auto_20171019_1942'),
]
operations = [
migrations.AlterField(
model_name='journal',
name='name',
field=models.CharField(choices=[('SciPostPhys', 'SciPost Physics'), ('SciPostPhysLectNotes', 'SciPost Physics Lecture Notes'), ('SciPostPhysProc', 'SciPost Physics Proceedings'), ('SciPostPhysSel', 'SciPost Physics Select'), ('SciPostPhysProc', 'SciPost Physics Proceedings')], max_length=100, unique=True),
),
]
......@@ -9,6 +9,7 @@ class ProceedingsForm(forms.ModelForm):
fields = (
'issue',
'event_name',
'event_suffix',
'event_description',
'event_start_date',
'event_end_date',
......
# -*- coding: utf-8 -*-
# Generated by Django 1.11.4 on 2017-11-01 08:44
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('proceedings', '0002_remove_proceedings_issue_name'),
]
operations = [
migrations.AddField(
model_name='proceedings',
name='event_suffix',
field=models.CharField(blank=True, max_length=256),
),
]
......@@ -19,6 +19,7 @@ class Proceedings(TimeStampedModel):
# Event the Proceedings is for
event_name = models.CharField(max_length=256, blank=True)
event_suffix = models.CharField(max_length=256, blank=True)
event_description = models.TextField(blank=True)
event_start_date = models.DateField(null=True, blank=True)
event_end_date = models.DateField(null=True, blank=True)
......@@ -41,7 +42,10 @@ class Proceedings(TimeStampedModel):
default_related_name = 'proceedings'
def __str__(self):
return self.event_name
_str = self.event_name
if self.event_suffix:
_str += ' ({s})'.format(s=self.event_suffix)
return _str
def get_absolute_url(self):
return reverse('proceedings:proceedings_details', args=(self.id,))
......
# -*- coding: utf-8 -*-
# Generated by Django 1.11.4 on 2017-11-01 08:44
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('submissions', '0079_auto_20171021_1456'),
]
operations = [
migrations.AlterField(
model_name='submission',
name='submitted_to_journal',
field=models.CharField(choices=[('SciPostPhys', 'SciPost Physics'), ('SciPostPhysLectNotes', 'SciPost Physics Lecture Notes'), ('SciPostPhysProc', 'SciPost Physics Proceedings')], max_length=30, verbose_name='Journal to be submitted to'),
),
]
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