|
|
@ -2,7 +2,7 @@ from django.db import models |
|
|
|
from django.forms import ModelForm, DateField, ChoiceField, RadioSelect |
|
|
|
from django.contrib.admin.widgets import AdminDateWidget |
|
|
|
|
|
|
|
from .models import Project, Volunteer, IFG, Library |
|
|
|
from .models import Project, Volunteer, IFG, Library, TYPE_CHOICES |
|
|
|
|
|
|
|
class ProjectForm(ModelForm): |
|
|
|
|
|
|
@ -15,13 +15,7 @@ class ProjectForm(ModelForm): |
|
|
|
|
|
|
|
class VolunteerForm(ModelForm): |
|
|
|
|
|
|
|
CHOICES = [('BIB', 'Bibliotheksstipendium'), |
|
|
|
('ELIT', 'eLiteraturstipendium'), |
|
|
|
('SOFT', 'Softwarestipendium'), |
|
|
|
('VIS', 'Visitenkarten, Mailingliste oder E-Mail-Adresse'), |
|
|
|
('IFG', 'Kostenübernahme IFG-Anfrage'), |
|
|
|
('LIT', 'Literaturstipendium'),] |
|
|
|
choice = ChoiceField(choices=CHOICES, widget=RadioSelect) |
|
|
|
choice = ChoiceField(choices=TYPE_CHOICES, widget=RadioSelect) |
|
|
|
|
|
|
|
class Meta: |
|
|
|
model = Volunteer |
|
|
|