django-cookie-consent
  • Quickstart
  • Main concepts
  • Usage
  • Javascript integration
  • Settings
  • Example app
  • API Reference
    • Models
    • Views
      • CookieGroupAcceptView
        • CookieGroupAcceptView.cookie_process_action
      • CookieGroupBaseProcessView
        • CookieGroupBaseProcessView.cookie_process_action
        • CookieGroupBaseProcessView.get_default_redirect_url()
      • CookieGroupDeclineView
        • CookieGroupDeclineView.cookie_process_action
      • CookieGroupListView
        • CookieGroupListView.model
      • CookieStatusView
    • Util
    • Template tags
    • Middleware
  • Contributing
  • Migrating to 1.0
  • Changelog
django-cookie-consent
  • API Reference
  • Views
  • View page source

Views

class cookie_consent.views.CookieGroupAcceptView(**kwargs)

View to accept CookieGroup.

cookie_process_action: Literal['accept', 'decline'] = 'accept'

Processing action to apply, must be set on the subclasses.

class cookie_consent.views.CookieGroupBaseProcessView(**kwargs)

Process the cookie groups submitted in the POST request (or URL parameters).

RedirectURLMixin takes care of the hardening against open redirects.

cookie_process_action: Literal['accept', 'decline']

Processing action to apply, must be set on the subclasses.

get_default_redirect_url() → str

Return the default redirect URL.

class cookie_consent.views.CookieGroupDeclineView(**kwargs)

View to decline CookieGroup.

cookie_process_action: Literal['accept', 'decline'] = 'decline'

Processing action to apply, must be set on the subclasses.

class cookie_consent.views.CookieGroupListView(**kwargs)

Display all cookies.

model

alias of CookieGroup

class cookie_consent.views.CookieStatusView(**kwargs)

Check the current accept/decline status for cookies.

The returned accept and decline URLs are specific to this user and include the cookie groups that weren’t accepted or declined yet.

Note that this endpoint also returns a CSRF Token to be used by the frontend, as baking a CSRFToken into a cached page will not reliably work.

Previous Next

© Copyright 2013, Bojan Mihelac.

Built with Sphinx using a theme provided by Read the Docs.