forked from rc/aircox
cfr #121 Co-authored-by: Christophe Siraut <d@tobald.eu.org> Co-authored-by: bkfox <thomas bkfox net> Co-authored-by: Thomas Kairos <thomas@bkfox.net> Reviewed-on: rc/aircox#131 Co-authored-by: Chris Tactic <ctactic@noreply.git.radiocampus.be> Co-committed-by: Chris Tactic <ctactic@noreply.git.radiocampus.be>
24 lines
464 B
Python
24 lines
464 B
Python
from django import forms
|
|
from django.forms.models import modelformset_factory
|
|
|
|
from aircox import models
|
|
|
|
|
|
__all__ = ("TrackFormSet",)
|
|
|
|
|
|
TrackFormSet = modelformset_factory(
|
|
models.Track,
|
|
fields=[
|
|
"position",
|
|
"episode",
|
|
"artist",
|
|
"title",
|
|
"tags",
|
|
],
|
|
widgets={"episode": forms.HiddenInput(), "position": forms.HiddenInput()},
|
|
can_delete=True,
|
|
extra=0,
|
|
)
|
|
"""Track formset used in EpisodeUpdateView."""
|