diff options
Diffstat (limited to 'apps/forum/forms.py')
-rw-r--r-- | apps/forum/forms.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/apps/forum/forms.py b/apps/forum/forms.py new file mode 100644 index 0000000..655a318 --- /dev/null +++ b/apps/forum/forms.py @@ -0,0 +1,13 @@ +#form.py +from django.forms import ModelForm +from django.forms.widgets import TextInput +from .models import Category + + +class CategoryForm(ModelForm): + class Meta: + model = Category + fields = '__all__' + widgets = { + 'color_rgb': TextInput(attrs={'type': 'color'}), + } |