Skip to content

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.

2 participants