-
Notifications
You must be signed in to change notification settings - Fork 16
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
Add DSAR admin page #1602
Add DSAR admin page #1602
Conversation
) | ||
|
||
|
||
@staff_member_required |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm thinking it might be nice to also make this require certain permissions so not everyone with a Basket login sees this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added the DSAR user permission and group to the 2nd commit on this PR.
ddded2c
to
2ba2eb8
Compare
2ba2eb8
to
015bbdc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a couple comments you can take or leave. Thanks for knocking this out!
@@ -0,0 +1,6 @@ | |||
from django.contrib import admin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like this file and the apps.py
work here, but I thought they went in app folders like base
where the rest of the stuff in the PR went. No?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's here b/c I defined it to be here based on the basket/apps.py
file pointing to this. It seemed like a good general place to put it that isn't app specific.
basket/base/forms.py
Outdated
return [] | ||
|
||
emails = [] | ||
for email in [v.strip() for v in value.split("\n")]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it'd be safer to use value.splitlines()
, though using split("\n")
and strip()
is probably roughly equivalent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't strip()
but it probably supports other line boundaries, so I'll switch to splitlines()
. 👍
Updated to add forms and view tests, and review fixes. |
This adds a DSAR page to the admin.
Step 1: Empty page
Step 2: Enter emails
Step 3: Output (with copy button)