Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
fsoest committed Jan 22, 2025
1 parent 12da095 commit 4f93ec6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion S1/waitinglists/templates/waitinglists/user_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ <h4>Actions</h4>
<form method="post" action="">
{% csrf_token %}
<div class="form-group">
<label for="id_text" class="form-label">Add Comment</label>
<label for="id_text" class="form-label">Add Comment</label><br>
{{ form.text }}
</div>
<button type="submit" class="btn btn-primary">Submit</button>
Expand Down
4 changes: 2 additions & 2 deletions S1/waitinglists/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -378,9 +378,9 @@ def user_detail(request, user_id):
if request.method == "POST":
form = CommentForm(request.POST)
if form.is_valid():
comment = form.cleaned_data["text"]
text = form.cleaned_data["text"]
author = request.user
user.comments.create(comment=comment, author=author)
user.comments.create(text=text, author=author)
return HttpResponseRedirect(reverse("user_detail", args=[user_id]))
else:
form = CommentForm()
Expand Down

0 comments on commit 4f93ec6

Please sign in to comment.