Fixes 18555: Fix model URL generator for plugins#18607
Merged
jeremystretch merged 7 commits intonetbox-community:mainfrom Feb 18, 2025
Merged
Fixes 18555: Fix model URL generator for plugins#18607jeremystretch merged 7 commits intonetbox-community:mainfrom
jeremystretch merged 7 commits intonetbox-community:mainfrom
Conversation
jeremystretch
requested changes
Feb 10, 2025
Member
jeremystretch
left a comment
There was a problem hiding this comment.
No issues with the fix itself, but I'd like to see if we can find a less disruptive solution for testing.
This reverts commit f07642b.
Instead of using a single model for testing, one is used for testing the plugin API and a dedicated one is used for testing the NetBox plugin model features.
jeremystretch
approved these changes
Feb 18, 2025
Member
jeremystretch
left a comment
There was a problem hiding this comment.
LGTM, thanks @alehaa! (I renamed the test module to test_models.py just to be consistent with the other apps.)
bctiemann
pushed a commit
that referenced
this pull request
Mar 6, 2025
* Fix model URL generator for plugins * Fix reverse accessor warning * Revert "Fix reverse accessor warning" This reverts commit f07642b. * Add URL test case for regular models * Split dummy models Instead of using a single model for testing, one is used for testing the plugin API and a dedicated one is used for testing the NetBox plugin model features. * Fix filterset test case error * Rename test module --------- Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes: #18555
The default
get_absolute_url()implementation can now return the URL for plugins.