# Path: showcase/forms.py
# class FormExample(forms.Form):
#     text = forms.CharField()
#     email = forms.EmailField()
#     number = forms.CharField(widget=forms.NumberInput())
#     url = forms.CharField(widget=forms.URLInput())
#     password = forms.CharField(widget=forms.PasswordInput())
#     select = forms.ChoiceField(choices=COLOR_CHOICES)
#     multi_select = forms.MultipleChoiceField(choices=COLOR_CHOICES)
#     textarea = forms.CharField(widget=forms.Textarea())
#     checkbox = forms.BooleanField()
#     checkboxes = forms.MultipleChoiceField(
#         choices=COLOR_CHOICES,
#         widget=forms.CheckboxSelectMultiple()
#     )
#     radios = forms.ChoiceField(
#         choices=COLOR_CHOICES,
#         widget=forms.RadioSelect()
#     )
#     file = forms.FileField(required=True)
# 
# Path: showcase/models.py
# class Task(models.Model):
#     name = models.CharField(max_length=128)
#     done = models.BooleanField(default=False)


from django.views.generic import ListView, FormView
from .forms import FormExample
from .models import Task



class PaginatedList(ListView):
    template_name = 'showcase/paginated_list.html'
    model = Task
    paginate_by = 20


class FormExampleView(FormView):
    template_name = 'showcase/form.html'

# Path: showcase/forms.py
# class FormExample(forms.Form):
#     text = forms.CharField()
#     email = forms.EmailField()
#     number = forms.CharField(widget=forms.NumberInput())
#     url = forms.CharField(widget=forms.URLInput())
#     password = forms.CharField(widget=forms.PasswordInput())
#     select = forms.ChoiceField(choices=COLOR_CHOICES)
#     multi_select = forms.MultipleChoiceField(choices=COLOR_CHOICES)
#     textarea = forms.CharField(widget=forms.Textarea())
#     checkbox = forms.BooleanField()
#     checkboxes = forms.MultipleChoiceField(
#         choices=COLOR_CHOICES,
#         widget=forms.CheckboxSelectMultiple()
#     )
#     radios = forms.ChoiceField(
#         choices=COLOR_CHOICES,
#         widget=forms.RadioSelect()
#     )
#     file = forms.FileField(required=True)
# 
# Path: showcase/models.py
# class Task(models.Model):
#     name = models.CharField(max_length=128)
#     done = models.BooleanField(default=False)


# Path: showcase/views.py
from django.views.generic import ListView, FormView
from .forms import FormExample
from .models import Task




class PaginatedList(ListView):
    template_name = 'showcase/paginated_list.html'
    model = Task
    paginate_by = 20


class FormExampleView(FormView):
    template_name = 'showcase/form.html'

    form_class = FormExample