diff --git a/civicfix/core/forms.py b/civicfix/core/forms.py index 77787de..49c5aee 100644 --- a/civicfix/core/forms.py +++ b/civicfix/core/forms.py @@ -1,6 +1,6 @@ from django import forms from django.contrib.auth.forms import UserCreationForm -from .models import User, Issue +from .models import User, Issue, Comment class CitizenRegistrationForm(UserCreationForm): email = forms.EmailField(required=True) @@ -46,4 +46,12 @@ class IssueForm(forms.ModelForm): 'latitude': forms.HiddenInput(), 'longitude': forms.HiddenInput(), 'description': forms.Textarea(attrs={'rows': 4, 'placeholder': 'Describe the issue in detail...'}), - } \ No newline at end of file + } + +class CommentForm(forms.ModelForm): + class Meta: + model = Comment + fields = ["content"] + widgets = { + "content": forms.Textarea(attrs={"rows": 2, "placeholder": "Add a comment..."}) + }