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

Clean up accept/decline view interface #106

Open
4 tasks
sergei-maertens opened this issue Sep 24, 2023 · 1 comment
Open
4 tasks

Clean up accept/decline view interface #106

sergei-maertens opened this issue Sep 24, 2023 · 1 comment
Milestone

Comments

@sergei-maertens
Copy link
Collaborator

From: #100 (comment)

The cookie (group) accept/decline views now get their varnames from the Django URL patterns, where the varnames are a comma-separated string. Reversing this URL for all groups leads to double final slashes: accept// because there are no items. Validating this input is also harder than it should be.

Instead, these views should always be POST-ed to, never GET (since they need to be CSRF protected) and therefore we should use proper form data for this purposes. This in turn also allows us to clean up the URL patterns a bit and simplify the cookie bar Javascript.

💥 NOTE this is a potential breaking changes for those users that have set up custom templates to accept/decline cookie groups. It is expected that they use the template tags to craft the appropriate URLs, so perhaps we can provide a backwards compatible approach where the query params are added to the URL, which should then still end up in the POST data. We can then deprecate those templatetags but keep them around until 2.0 to minimize impact?

Tasks

@sergei-maertens
Copy link
Collaborator Author

#114 appears to be running into URL reversing errors when the cookie_consent_cookie_group_list URL is not hooked up either.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant