From e7b032cf9ea85dd06efffea20dc74b7b8f802055 Mon Sep 17 00:00:00 2001 From: kthoden Date: Wed, 14 Jul 2021 15:24:27 +0200 Subject: [PATCH] Close #3 --- eoaforthcoming/models.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/eoaforthcoming/models.py b/eoaforthcoming/models.py index a54d268..552cc36 100644 --- a/eoaforthcoming/models.py +++ b/eoaforthcoming/models.py @@ -3,6 +3,8 @@ # Create your models here. from cms.models import CMSPlugin, Model +from eoaseries.models import Series + class Forthcoming(Model): class Meta: verbose_name_plural = "Forthcoming publications" @@ -11,12 +13,11 @@ class Meta: max_length=200, unique=True ) - series_list = ( - ('Sources', 'Sources'), - ('Studies', 'Studies'), - ('Proceedings', 'Proceedings'), - ('Textbooks', 'Textbooks'), - ) + registered_series = Series.objects.all().order_by('name') + series_list = [] + for rs in registered_series: + newseries = (str(rs), str(rs)) + series_list.append(newseries) series = models.CharField(max_length=20, choices=series_list) author = models.CharField(