-
Notifications
You must be signed in to change notification settings - Fork 438
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
admin: Add support for comment search by URL #1000
admin: Add support for comment search by URL #1000
Conversation
If I see this correctly, the search only succeeds if you supply both the thread URL as well as a per-thread comment id. What about admins who would want to look up only |
Yes, this PR implements the requested search for specific comments. |
Could you create a follow-up PR? I would argue that admins most often would search for threads, not comments. |
I agree, searching by thread would likely be more common for admins. |
Added a new PR to search for comments by thread URL: #1020 |
Checklist
CHANGES.rst
because this is a user-facing change or an important bugfixWhat changes does this Pull Request introduce?
Added support for searching comments by URL in the admin interface. This includes changes to the backend to handle comment URL queries and extract comment IDs, and frontend changes to add a search input to the admin page.
Updated admin CSS to include styles for the new search input and button.
Modified the fetchall method in comments.py to accept an optional comment_id parameter for fetching a specific comment by ID.
Updated the admin HTML template to include a search form that allows inputting a comment URL for search.
Updated the admin method in views/comments.py to handle the comment_url query parameter, parse the URL to extract the comment ID, and fetch the corresponding comment.
Why is this necessary?
Closes #642
Demo: