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

ModelAdmin is a little difficult to work with #1354

Closed
5 tasks done
GuySartorelli opened this issue Aug 30, 2022 · 0 comments
Closed
5 tasks done

ModelAdmin is a little difficult to work with #1354

GuySartorelli opened this issue Aug 30, 2022 · 0 comments

Comments

@GuySartorelli
Copy link
Member

GuySartorelli commented Aug 30, 2022

ModelAdmin is a little clunky to work with at the moment - there are a few methods that don't require any instance data but aren't static, and any time you want to get a link for a managed model tab you need to re-implement the logic in sanitiseClassName() - and basically build the entire link from scratch every time with all of its component parts.

Acceptance Criteria

  • Methods that don't need to be instance methods should be static.
  • There should be an easy way to get a link for a managed model without having to reimplement sanitiseClassName().
  • There is a straightforward way to get a canonical edit link for objects managed by ModelAdmin
  • The changes are documented appropriately
  • Documentation that currently includes re-implementing str_replace('\\', '-', $class) is updated

PRs

Related PRs

These are an extended approach for resolving the "There is a straightforward way to get a canonical edit link for objects managed by ModelAdmin" acceptance criterion

@GuySartorelli GuySartorelli self-assigned this Sep 4, 2022
@GuySartorelli GuySartorelli removed their assignment Sep 14, 2022
@GuySartorelli GuySartorelli removed their assignment Sep 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants