mirror of
https://github.com/django/django.git
synced 2024-12-28 20:16:19 +00:00
f026a519ae
This also updates all dependent functionality, including modelform_factory and modelformset_factory, and the generic views `ModelFormMixin`, `CreateView` and `UpdateView` which gain a new `fields` attribute.
15 lines
289 B
Python
15 lines
289 B
Python
from django import forms
|
|
|
|
from .models import Event
|
|
|
|
class EventForm(forms.Form):
|
|
dt = forms.DateTimeField()
|
|
|
|
class EventSplitForm(forms.Form):
|
|
dt = forms.SplitDateTimeField()
|
|
|
|
class EventModelForm(forms.ModelForm):
|
|
class Meta:
|
|
model = Event
|
|
fields = '__all__'
|