forms.py 349 B

1234567891011121314
  1. from django import forms
  2. from django.contrib.auth.models import User
  3. from django.core.exceptions import ValidationError
  4. from expenses.models import Category
  5. class CategoryForm(forms.ModelForm):
  6. class Meta:
  7. model = Category
  8. fields = "__all__"
  9. def __init__(self, *args, **kwargs):
  10. super().__init__(*args, **kwargs)