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

Minor fixes for tagging django admin [FC-0036] #114

Merged
merged 3 commits into from
Nov 10, 2023
Merged

Conversation

bradenmacdonald
Copy link
Contributor

This fixes a few minor issues I found while reviewing openedx/edx-platform#33563 :

  • Some minor improvements to the django admin. I know we don't want to rely on the django admin too much, but it's sometimes handy to inspect what's going on with tagging/taxonomy model data.
  • Explicitly remove "Add" button for ObjectTags and Tags.
  • Editing a "normal" Taxonomy in the django admin was not possible, because _taxonomy_class didn't have blank=True. I fixed that.
  • Some fields in the admin like ObjectTag.tag were loading all possible tags into a select widget, which could be hundreds of thousands. I changed it to an auto-complete widget.
  • On my machine, the Language Taxonomy didn't have the right _taxonomy_class set. I think this is due to the messy migration history. I included a fix in case anyone else has the same issue on their machine. I was trying to figure out why the API was not showing "Languages" as system-defined.

ObjectTag before:

Screenshot 2023-11-09 at 11 32 42 AM

ObjectTag after:

Screenshot 2023-11-09 at 11 36 26 AM

Tag before:

Screenshot 2023-11-09 at 11 34 12 AM

Tag after:

Screenshot 2023-11-09 at 11 36 05 AM

Private-ref: FAL-3523

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Nov 9, 2023
@openedx-webhooks
Copy link

Thanks for the pull request, @bradenmacdonald! Please note that it may take us up to several weeks or months to complete a review and merge your PR.

Feel free to add as much of the following information to the ticket as you can:

  • supporting documentation
  • Open edX discussion forum threads
  • timeline information ("this must be merged by XX date", and why that is)
  • partner information ("this is a course on edx.org")
  • any other information that can help Product understand the context for the PR

All technical communication about the code itself will be done via the GitHub pull request interface. As a reminder, our process documentation is here.

Please let us know once your PR is ready for our review and all tests are green.

Copy link
Contributor

@pomegranited pomegranited left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Thank you for these fixes @bradenmacdonald !

  • I tested this using Django Admin on my devstack.
  • I read through the code
  • I checked for accessibility issues N/A
  • Includes documentation

@@ -170,7 +170,8 @@ class TaxonomyView(ModelViewSet):

"""

lookup_value_regex = r"\d+"
# System taxonomies use negative numbers for their primary keys
lookup_value_regex = r'-?\d+'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this fix - looks good! 👍🏻

@pomegranited pomegranited merged commit 531838b into main Nov 10, 2023
6 checks passed
@pomegranited pomegranited deleted the braden/fixes branch November 10, 2023 02:07
@openedx-webhooks
Copy link

@bradenmacdonald 🎉 Your pull request was merged! Please take a moment to answer a two question survey so we can improve your experience in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
open-source-contribution PR author is not from Axim or 2U
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants