mirror of
https://github.com/Findus23/RPGnotes.git
synced 2024-09-19 15:43:45 +02:00
15 lines
382 B
Python
15 lines
382 B
Python
|
from django.forms import ModelForm, ModelMultipleChoiceField, CheckboxSelectMultiple
|
||
|
|
||
|
from days.models import Session, IngameDay
|
||
|
|
||
|
|
||
|
class DayForm(ModelForm):
|
||
|
sessions = ModelMultipleChoiceField(
|
||
|
queryset=Session.objects.all(),
|
||
|
widget=CheckboxSelectMultiple()
|
||
|
)
|
||
|
|
||
|
class Meta:
|
||
|
model = IngameDay
|
||
|
fields = ["day", "description_md", "sessions"]
|