citavi_mapper/frontend/formsets.py

19 lines
479 B
Python
Raw Normal View History

2014-12-10 16:28:21 +01:00
from django import forms
from frontend.models import Presentation, PresentationEvent, PresentationPerson
from django.forms.models import inlineformset_factory
2014-12-10 16:28:21 +01:00
PresentationPersonInlineFormset = inlineformset_factory(
Presentation,
PresentationPerson,
extra=1,
2014-12-10 16:28:21 +01:00
can_delete=False,
widgets={'hshmembership': forms.RadioSelect}
)
PresentationEventInlineFormset = inlineformset_factory(
Presentation,
PresentationEvent,
extra=1,
can_delete=False
)