guild-journal/guild/forms.py

13 lines
332 B
Python

from django import forms
from guild.models import PlaySession
class PlaySessionForm(forms.ModelForm):
class Meta:
model = PlaySession
fields = ["date", "characters", "summary"]
# set date wideget to type="date"
widgets = {
"date": forms.DateInput(attrs={"type": "date"}),
}