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

Allow URL customisation and specifying subset of CRUD roles. #44

Merged
merged 4 commits into from
Apr 26, 2024

Conversation

carltongibson
Copy link
Owner

Route only some roles:

BookmarkView.get_urls(roles={Role.LIST, Role.DETAIL})

Plus, specify url_base, and path_converter for URL routing.

Fixes #11
Fixes #32

cc. @kasun @joshuadavidthomas @jefftriplett

carltongibson and others added 3 commits April 26, 2024 16:47
Route only some roles:

   BookmarkView.get_urls(roles={Role.LIST, Role.DETAIL})

Plus, specify url_base, and path_converter for URL routing.

Co-authored-by: Kasun Herath <[email protected]>
url_base = view_cls.url_base
url_kwarg = view_cls.lookup_url_kwarg or view_cls.lookup_field
path_converter = view_cls.path_converter
match self:

Choose a reason for hiding this comment

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

😘

@jefftriplett
Copy link

Nicely done. It'll be nice to delete some class overrides and possibly templates that were mostly serving to override the action values/links. 🎉

@carltongibson
Copy link
Owner Author

@jefftriplett @joshuadavidthomas still has a few open issues about the actions list… #39, #40, #41 — so it might not clear up the template, just yet.

Main points are:

  • Subset of methods easier.
  • Customise URL, and things like UUID lookups.

@carltongibson carltongibson merged commit eacd6fe into main Apr 26, 2024
13 checks passed
@carltongibson carltongibson deleted the custom-roles branch April 26, 2024 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants