-
-
Notifications
You must be signed in to change notification settings - Fork 775
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
records form submission records for GDPR purposes + mailchimp permi-delete #1279
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1279 +/- ##
==========================================
+ Coverage 31.29% 31.31% +0.01%
==========================================
Files 122 122
Lines 8521 8535 +14
Branches 1116 1114 -2
==========================================
+ Hits 2667 2673 +6
- Misses 5743 5751 +8
Partials 111 111
Continue to review full report at Codecov.
|
I will add the cookie consent to this PR if that's okay. |
@SaptakS sounds great |
client.lists.members.delete( | ||
list_id=settings.MAILCHIMP_LIST_ID, | ||
subscriber_hash=subscriber_hash, | ||
) |
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.
When we start running automatic linting/styling checks, the indentation on these parentheses will be automatically moved up to the previous line or the indent will move inward by one with the trailing ,
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.
ok. maybe i should download a sublime linter.
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.
@mbeacom do we follow a strict PEP8 or flake8?
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.
@mbeacom as mentioned in PEP-8, this might be still correct indentation I think:
The closing brace/bracket/parenthesis on multiline constructs may either line up under the first non-whitespace character of the last line of list
or it may be lined up under the first character of the line that starts the multiline construct, as in:
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.
flake8
- It's technically legal, but most autocorrection utilities are going to adjust the indentation (yapf, autopep8, etc).
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.
As far as sublime text goes, these guides aren't bad for tooling subl to be a first class python ide: https://fosstack.com/setup-sublime-python/ https://medium.com/@nazrulworld/make-sublime-text-as-the-best-ide-for-full-stack-python-development-b6a3148cb272 https://cewing.github.io/training.codefellows/assignments/day01/sublime_as_ide.html
app/marketing/views.py
Outdated
subscriber_hash=subscriber_hash, | ||
) | ||
except Exception as e: | ||
print(e) |
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.
Can we use a logger here?
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.
updated
list_id=settings.MAILCHIMP_LIST_ID, | ||
subscriber_hash=subscriber_hash, | ||
) | ||
except Exception as e: |
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.
Which exception(s) are we expecting here? IndexError and KeyError per line 432 and probably a MailChimp
connection error?
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.
any exception. the point is that any exception that happens shouldn't cause the page to 500
app/marketing/views.py
Outdated
@@ -153,6 +155,15 @@ def privacy_settings(request): | |||
return TemplateResponse(request, 'settings/privacy.html', context) | |||
|
|||
|
|||
def record_form_submission(request, obj, _type): |
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.
Can we rename _type
to record_type
or submission_type
to avoid confusion as a private var?
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.
updated
…web into kevin/form_submission_records
app/marketing/views.py
Outdated
@@ -50,6 +51,9 @@ | |||
from retail.helpers import get_ip | |||
|
|||
|
|||
logger = logging.getLogger(__name__) |
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.
F821 undefined name 'logging'
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 fixed
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.
lgtm - I think we're still waiting on cookie changes here, though?
@mbeacom since we are thinking of migrating from cookielaw, I think I will handle that separately from this PR. So it's good to be merged. |
Description
records form submission records for GDPR purposes
also does a permi-delete in mailchimp when users account is closed
Checklist
Affected core subsystem(s)
settings/profiles
Testing
tested it
Refers/Fixes
Self, Emails