Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: Comment approval alert not being displayed in the correct place #46

Closed
chris-townsend opened this issue Nov 24, 2022 · 1 comment
Closed
Assignees
Labels
bug Something isn't working

Comments

@chris-townsend
Copy link
Owner

chris-townsend commented Nov 24, 2022

Bug:

When a logged-in user goes to submit a comment, the comment approval message appears where the user has typed the comment. As the page refreshes when a user clicks submit, it would be handy if the alert appeared at the top of the page, to follow similar styling rules for when a user logs in or out of their account.

Video:

comment-approval-alert.mp4

@chris-townsend
Copy link
Owner Author

Fix:

  • Import messages from django.contrib in views.py - from django.contrib import messages

  • Add to post variable after the comment gets saved - messages.success(self.request, 'Your comment is awaiting approval')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Development

No branches or pull requests

1 participant