guild-journal/guild/forms.py

18 lines
341 B
Python
Raw Normal View History

2023-06-10 20:32:45 +00:00
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"}),
}