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."""
