Skip to content

Commit

Permalink
Fix forms
Browse files Browse the repository at this point in the history
  • Loading branch information
fsoest committed Jan 22, 2025
1 parent 50956f6 commit 12da095
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion S1/waitinglists/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class Meta:
)


class CommentForm(forms.Form):
class CommentForm(forms.ModelForm):
class Meta:
model = Comment
exclude = ["user", "date_added", "author"]
Expand Down
13 changes: 7 additions & 6 deletions S1/waitinglists/templates/waitinglists/user_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,13 @@ <h4>Comments</h4>
<div class="col-6">
<h4>Actions</h4>
<form method="post" action="">
{% csrf_token %}
<div class="form-group">
<label for="id_text" class="form-label">Add Comment</label>
{{ form.text }}
<button type="submit" class="btn btn-primary">Submit</button>
</form>
{% csrf_token %}
<div class="form-group">
<label for="id_text" class="form-label">Add Comment</label>
{{ form.text }}
</div>
<button type="submit" class="btn btn-primary">Submit</button>
</form>
</div>
</div>
</div>
Expand Down

0 comments on commit 12da095

Please sign in to comment.