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

Move ImportForm and related logic out of ModelAdmin #1768

Open
GuySartorelli opened this issue May 30, 2024 · 0 comments
Open

Move ImportForm and related logic out of ModelAdmin #1768

GuySartorelli opened this issue May 30, 2024 · 0 comments

Comments

@GuySartorelli
Copy link
Member

GuySartorelli commented May 30, 2024

The logic for importing records into a GridField in a ModelAdmin is half controlled by the gridfield and half controlled by the admin.
It should all be managed in the gridfield, so we can reuse it easily in other admin sections.

Related

Acceptance criteria

  • ImportForm() is moved out of ModelAdmin and handled by the relevant gridfield component instead.
  • The importer object is accessible either via the DataObject class, or passed into the component with a setter method, or both (whichever makes most sense to the person implementing - give a brief explanation of why you went with what you did)
  • Provide a way to update/replace the form at a per-gridfield level (see SecurityAdmin)
  • import() should be moved along with it
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