Skip to content

Using Role url reversal to support all custom lookup_fields (#86)#87

Merged
carltongibson merged 1 commit intocarltongibson:mainfrom
dennisstritzke:lookup-field-success-url
Jul 3, 2025
Merged

Using Role url reversal to support all custom lookup_fields (#86)#87
carltongibson merged 1 commit intocarltongibson:mainfrom
dennisstritzke:lookup-field-success-url

Conversation

@dennisstritzke
Copy link
Contributor

@dennisstritzke dennisstritzke commented Jul 3, 2025

Using the Roles url reversal capabilities to support custom lookup_fields (and other future customisations).
fixes #86

I tried sticking with the current test structure:

  • used the request / response testing instead of testing get_success_url directly
  • did not test the creation form get as it is unrelated to the issue
  • made sure the test actually fails without the changes of this PR
  • ... and the collection name has to fit the bookmarks of the tests, right?

To prevent errors of this category, I also checked the code for other locations of manually reversing urls. There aren't any.
(I did that yesterday when I discovered the same problem when subclassing Neapolitan components to properly support nested views. So #86 felt like a call to action. 😅)

Copy link
Owner

@carltongibson carltongibson left a comment

Choose a reason for hiding this comment

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

OK, looks good. Thanks @dennisstritzke 👍

@carltongibson carltongibson merged commit b1e50db into carltongibson:main Jul 3, 2025
12 checks passed
@carltongibson
Copy link
Owner

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.

get_success_url based on lookup_field?

2 participants