shuup.gdpr.admin_module package
Submodules
shuup.gdpr.admin_module.forms module
- class shuup.gdpr.admin_module.forms.QuickAddPageSelect(attrs=None, choices=(), editable_model=None, initial=None, model=None)[source]
Bases:
QuickAddRelatedObjectSelect
- Parameters:
int (initial) – primary key of the object that is initially selected
- url = '/sa/cms/page/new/'
- property media
- class shuup.gdpr.admin_module.forms.QuickAddPageMultiSelect(attrs=None, choices=(), editable_model=None, initial=None, model=None)[source]
Bases:
QuickAddRelatedObjectMultiSelect
- Parameters:
list[int] (initial) – list of primary keys of the objects that are initially selected
- url = '/sa/cms/page/new/'
- property media
- class shuup.gdpr.admin_module.forms.GDPRSettingsForm(**kwargs)[source]
Bases:
MultiLanguageModelForm
- class Meta[source]
Bases:
object
- exclude = ('shop',)
- model
alias of
GDPRSettings
- widgets = {'auth_consent_text': <shuup.admin.forms.widgets.TextEditorWidget object>, 'consent_pages': <shuup.gdpr.admin_module.forms.QuickAddPageMultiSelect object>, 'cookie_banner_content': <shuup.admin.forms.widgets.TextEditorWidget object>, 'cookie_privacy_excerpt': <shuup.admin.forms.widgets.TextEditorWidget object>, 'privacy_policy_page': <shuup.gdpr.admin_module.forms.QuickAddPageSelect object>}
- base_fields = {'auth_consent_text': <django.forms.fields.CharField object>, 'consent_pages': <django.forms.models.ModelMultipleChoiceField object>, 'cookie_banner_content': <django.forms.fields.CharField object>, 'cookie_privacy_excerpt': <django.forms.fields.CharField object>, 'enabled': <django.forms.fields.BooleanField object>, 'privacy_policy_page': <django.forms.models.ModelChoiceField object>, 'skip_consent_on_auth': <django.forms.fields.BooleanField object>}
- declared_fields = {'auth_consent_text': <django.forms.fields.CharField object>, 'cookie_banner_content': <django.forms.fields.CharField object>, 'cookie_privacy_excerpt': <django.forms.fields.CharField object>}
- property media
Return all media required to render the widgets on this form.
- class shuup.gdpr.admin_module.forms.GDPRCookieCategoryForm(**kwargs)[source]
Bases:
MultiLanguageModelForm
- class Meta[source]
Bases:
object
- exclude = ('shop',)
- model
alias of
GDPRCookieCategory
- widgets = {'cookies': <django.forms.widgets.TextInput object>}
- base_fields = {'always_active': <django.forms.fields.BooleanField object>, 'block_snippets': <django.forms.models.ModelMultipleChoiceField object>, 'cookies': <django.forms.fields.CharField object>, 'default_active': <django.forms.fields.BooleanField object>, 'how_is_used': <django.forms.fields.CharField object>, 'name': <django.forms.fields.CharField object>}
- declared_fields = {'how_is_used': <django.forms.fields.CharField object>, 'name': <django.forms.fields.CharField object>}
- property media
Return all media required to render the widgets on this form.
- class shuup.gdpr.admin_module.forms.GDPRCookieCategoryFormSet(*args, **kwargs)[source]
Bases:
BaseModelFormSet
- form_class
alias of
GDPRCookieCategoryForm
- validate_min = False
- can_delete = True
- can_order = False
- validate_max = False
- min_num = 0
- max_num = 1000
- absolute_max = 1000
- model
alias of
GDPRCookieCategory
- extra = 1
- property can_delete_extra
- property empty_form
shuup.gdpr.admin_module.toolbar module
- class shuup.gdpr.admin_module.toolbar.AnonymizeContactToolbarButton(object, **kwargs)[source]
Bases:
PostActionButton
- Parameters:
text – The actual text for the button.
icon – Icon CSS class string
disable_reason (str|None) – The reason for this button to be disabled. It’s considered good UX to have an user-visible reason for disabled actions; thus the only way to disable an action is to set the reason. See http://stackoverflow.com/a/372503/51685.
tooltip (str|None) – Tooltip string, if any. May be replaced by the disable reason.
extra_css_class (str) – Extra CSS class(es)
required_permissions (Iterable[str]) – Optional iterable of permission strings
- __init__(object, **kwargs)[source]
- Parameters:
text – The actual text for the button.
icon – Icon CSS class string
disable_reason (str|None) – The reason for this button to be disabled. It’s considered good UX to have an user-visible reason for disabled actions; thus the only way to disable an action is to set the reason. See http://stackoverflow.com/a/372503/51685.
tooltip (str|None) – Tooltip string, if any. May be replaced by the disable reason.
extra_css_class (str) – Extra CSS class(es)
required_permissions (Iterable[str]) – Optional iterable of permission strings
- class shuup.gdpr.admin_module.toolbar.DownloadDataToolbarButton(object, **kwargs)[source]
Bases:
PostActionButton
- Parameters:
text – The actual text for the button.
icon – Icon CSS class string
disable_reason (str|None) – The reason for this button to be disabled. It’s considered good UX to have an user-visible reason for disabled actions; thus the only way to disable an action is to set the reason. See http://stackoverflow.com/a/372503/51685.
tooltip (str|None) – Tooltip string, if any. May be replaced by the disable reason.
extra_css_class (str) – Extra CSS class(es)
required_permissions (Iterable[str]) – Optional iterable of permission strings
- __init__(object, **kwargs)[source]
- Parameters:
text – The actual text for the button.
icon – Icon CSS class string
disable_reason (str|None) – The reason for this button to be disabled. It’s considered good UX to have an user-visible reason for disabled actions; thus the only way to disable an action is to set the reason. See http://stackoverflow.com/a/372503/51685.
tooltip (str|None) – Tooltip string, if any. May be replaced by the disable reason.
extra_css_class (str) – Extra CSS class(es)
required_permissions (Iterable[str]) – Optional iterable of permission strings
shuup.gdpr.admin_module.views module
- class shuup.gdpr.admin_module.views.GDPRView(**kwargs)[source]
Bases:
SaveFormPartsMixin
,FormPartsViewMixin
,CreateOrUpdateView
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
- model
alias of
GDPRSettings
- template_name = 'shuup/admin/gdpr/edit.jinja'
- base_form_part_classes: Any | Any = [<class 'shuup.gdpr.admin_module.forms.GDPRBaseFormPart'>, <class 'shuup.gdpr.admin_module.forms.GDPRCookieCategoryFormPart'>]
- success_url = '/sa/gdpr/'
- get_queryset()[source]
Return the
QuerySet
that will be used to look up the object.This method is called by the default implementation of get_object() and may not be called if get_object() is overridden.
- class shuup.gdpr.admin_module.views.BaseContactView(**kwargs)[source]
Bases:
SingleObjectMixin
,View
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
- class shuup.gdpr.admin_module.views.GDPRDownloadDataView(**kwargs)[source]
Bases:
BaseContactView
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
- class shuup.gdpr.admin_module.views.GDPRAnonymizeView(**kwargs)[source]
Bases:
BaseContactView
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
Module contents
- class shuup.gdpr.admin_module.GDPRModule[source]
Bases:
AdminModule
- name = 'GDPR'
- Return type: