from django.forms.widgets import Select
from main.forms import IconInput, NummiForm

from .models import Category


class CategoryForm(NummiForm):
    class Meta:
        model = Category
        fields = [
            "name",
            "icon",
            "budget",
        ]
        widgets = {
            "icon": IconInput,
        }


class CategorySelect(Select):
    template_name = "category/forms/widgets/category.html"
