from django import forms from frontend.models import Presentation, PresentationEvent, PresentationPerson from django.forms.models import inlineformset_factory from bootstrap3_datetime.widgets import DateTimePicker PresentationPersonInlineFormset = inlineformset_factory( Presentation, PresentationPerson, extra=1, can_delete=False, widgets={'hshmembership': forms.RadioSelect} ) PresentationEventInlineFormset = inlineformset_factory( Presentation, PresentationEvent, extra=1, can_delete=False, widgets={ 'date': DateTimePicker(options={"format": "YYYY-MM-DD", 'pickSeconds': False}), 'start_date': DateTimePicker(options={"format": "YYYY-MM-DD", 'pickSeconds': False}), 'end_date': DateTimePicker(options={"format": "YYYY-MM-DD", 'pickSeconds': False}) } )