forked from beba/foerderbarometer
set explicit library type choices
This commit is contained in:
parent
d40c53bc80
commit
60a5538033
|
|
@ -274,13 +274,15 @@ TYPE_CHOICES = {
|
||||||
TYPE_VIS: type_link('E-Mail-Adressen_und_Visitenkarten#Visitenkarten', 'Visitenkarten'),
|
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!
|
# same model is used for Library, ELitStip and Software!
|
||||||
class Library(Grant):
|
class Library(Grant):
|
||||||
|
|
||||||
type = models.CharField(
|
type = models.CharField(
|
||||||
max_length=4,
|
max_length=4,
|
||||||
choices=TYPE_CHOICES.items(), #attention: actually only BIB, ELIT, SOFT should be used here
|
choices=LIBRARY_TYPE_CHOICES,
|
||||||
default='BIB',
|
default='BIB',
|
||||||
)
|
)
|
||||||
library = models.CharField(max_length=200)
|
library = models.CharField(max_length=200)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue