diff --git a/input/models.py b/input/models.py index b065034..f4da70e 100755 --- a/input/models.py +++ b/input/models.py @@ -274,13 +274,15 @@ TYPE_CHOICES = { TYPE_VIS: type_link('E-Mail-Adressen_und_Visitenkarten#Visitenkarten', 'Visitenkarten'), } +LIBRARY_TYPES = TYPE_BIB, TYPE_ELIT, TYPE_SOFT +LIBRARY_TYPE_CHOICES = [(choice, TYPE_CHOICES[choice]) for choice in LIBRARY_TYPES] # same model is used for Library, ELitStip and Software! class Library(Grant): type = models.CharField( max_length=4, - choices=TYPE_CHOICES.items(), #attention: actually only BIB, ELIT, SOFT should be used here + choices=LIBRARY_TYPE_CHOICES, default='BIB', ) library = models.CharField(max_length=200)