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

Add merge tags tool #468

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Add merge tags tool #468

wants to merge 1 commit into from

Conversation

simonw
Copy link
Owner

@simonw simonw commented Jul 12, 2024

Add a tool for merging two tags at /admin/merge-tags/.

  • Add a view in blog/staff_views.py for handling the merge tags functionality with the staff_member_required decorator.
  • Add a URL pattern in config/urls.py for /admin/merge-tags/.
  • Create a form in templates/merge_tags.html with two input boxes for selecting tags using the /tags-autocomplete/ JSON endpoint.
  • On POST, update quotations, entries, and blogmarks tagged with the loser tag, remove the loser tag, and add the winner tag.
  • Delete the loser tag and create a PreviousTagName record pointing to the winner tag.
  • Add unit tests for the merge tags feature in blog/tests.py.

For more details, open the Copilot Workspace session.

@simonw
Copy link
Owner Author

simonw commented Jul 12, 2024

Direct assignment to the forward side of a many-to-many set is prohibited. Use tags.set() instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant