shuup.gdpr package
Subpackages
- shuup.gdpr.admin_module package
- Submodules
- shuup.gdpr.admin_module.forms module
QuickAddPageSelect
QuickAddPageMultiSelect
GDPRSettingsForm
GDPRCookieCategoryForm
GDPRBaseFormPart
GDPRCookieCategoryFormSet
GDPRCookieCategoryFormSet.form_class
GDPRCookieCategoryFormSet.validate_min
GDPRCookieCategoryFormSet.can_delete
GDPRCookieCategoryFormSet.can_order
GDPRCookieCategoryFormSet.validate_max
GDPRCookieCategoryFormSet.min_num
GDPRCookieCategoryFormSet.max_num
GDPRCookieCategoryFormSet.absolute_max
GDPRCookieCategoryFormSet.model
GDPRCookieCategoryFormSet.extra
GDPRCookieCategoryFormSet.__init__
GDPRCookieCategoryFormSet.get_queryset
GDPRCookieCategoryFormSet.form
GDPRCookieCategoryFormSet.can_delete_extra
GDPRCookieCategoryFormSet.empty_form
GDPRCookieCategoryFormSet.save
GDPRCookieCategoryFormPart
- shuup.gdpr.admin_module.toolbar module
- shuup.gdpr.admin_module.views module
- Module contents
- shuup.gdpr.templatetags package
Submodules
shuup.gdpr.anonymizer module
- class shuup.gdpr.anonymizer.Anonymizer[source]
Bases:
object
- mapping = {'birth_date': '_none_value', 'city': '_random_string', 'data': '_none_value', 'email': '_null_email', 'first_name': '_null_name', 'ip_address': '_null_ip', 'last_name': '_null_name', 'latitude': '_none_value', 'longitude': '_none_value', 'merchant_notes': '_blank_value', 'name': '_null_name', 'name_ext': '_blank_value', 'phone': '_null_phone', 'postal_code': '_null_zip', 'prefix': '_blank_value', 'street': '_random_string', 'street1': '_random_string', 'street2': '_random_string', 'street3': '_random_string', 'street_address': '_random_string', 'suffix': '_blank_value', 'tax_number': '_random_number', 'username': '_random_username', 'www': '_blank_value', 'zip_code': '_null_zip'}
shuup.gdpr.apps module
- class shuup.gdpr.apps.AppConfig(*args, **kwargs)[source]
Bases:
AppConfig
- name = 'shuup.gdpr'
- label = 'shuup_gdpr'
- default_auto_field = 'django.db.models.BigAutoField'
- provides = {'admin_contact_toolbar_action_item': ['shuup.gdpr.admin_module.toolbar:AnonymizeContactToolbarButton', 'shuup.gdpr.admin_module.toolbar:DownloadDataToolbarButton'], 'admin_module': ['shuup.gdpr.admin_module.GDPRModule'], 'checkout_confirm_form_field_provider': ['shuup.gdpr.providers:GDPRCheckoutFieldProvider'], 'customer_dashboard_items': ['shuup.gdpr.dashboard_items:GDPRDashboardItem'], 'front_auth_form_field_provider': ['shuup.gdpr.providers:GDPRAuthFieldProvider'], 'front_company_registration_form_provider': ['shuup.gdpr.providers:GDPRFormDefProvider'], 'front_registration_field_provider': ['shuup.gdpr.providers:GDPRRegistrationFieldProvider'], 'front_urls': ['shuup.gdpr.urls:urlpatterns'], 'notify_event': ['shuup.tasks.notify_events:TaskCreated'], 'xtheme_resource_injection': ['shuup.gdpr.resources:add_gdpr_consent_resources'], 'xtheme_snippet_blocker': ['shuup.gdpr.snippet_blocker.GDPRSnippetBlocker']}
See /provides for details about the
provides
variable.
shuup.gdpr.dashboard_items module
- class shuup.gdpr.dashboard_items.GDPRDashboardItem(request)[source]
Bases:
DashboardItem
- template_name = None
Title shown in dashboard menu and in dashboard
- title = 'My Data'
Sequence number of dashboard item
- icon = 'fa fa-shield'
Text for dashboard
If your dashboard item shows single object,
Edit
is just fine but if you are listing objects,Show All
might be better.
- description = 'Customer data'
shuup.gdpr.forms module
shuup.gdpr.models module
- class shuup.gdpr.models.GDPRSettings(id, shop, enabled, skip_consent_on_auth, privacy_policy_page)[source]
Bases:
TranslatableModel
- shop
Accessor to the related object on the forward side of a one-to-one relation.
In the example:
class Restaurant(Model): place = OneToOneField(Place, related_name='restaurant')
Restaurant.place
is aForwardOneToOneDescriptor
instance.
- enabled
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- skip_consent_on_auth
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- privacy_policy_page
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- consent_pages
Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
Pizza.toppings
andTopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- translations
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- exception DoesNotExist
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned
Bases:
MultipleObjectsReturned
- auth_consent_text
Descriptor for translated attributes.
This attribute proxies all get/set calls to the translated model.
- cookie_banner_content
Descriptor for translated attributes.
This attribute proxies all get/set calls to the translated model.
- cookie_privacy_excerpt
Descriptor for translated attributes.
This attribute proxies all get/set calls to the translated model.
- id
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- privacy_policy_page_id
- shop_id
- class shuup.gdpr.models.GDPRCookieCategory(id, shop, always_active, default_active, cookies)[source]
Bases:
TranslatableModel
- shop
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- always_active
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- default_active
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- cookies
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- block_snippets
Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
Pizza.toppings
andTopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- translations
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- exception DoesNotExist
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned
Bases:
MultipleObjectsReturned
- how_is_used
Descriptor for translated attributes.
This attribute proxies all get/set calls to the translated model.
- id
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- name
Descriptor for translated attributes.
This attribute proxies all get/set calls to the translated model.
- shop_id
- class shuup.gdpr.models.GDPRUserConsent(id, created_on, shop, user)[source]
Bases:
Model
- created_on
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- shop
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- user
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- documents
Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
Pizza.toppings
andTopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- exception DoesNotExist
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned
Bases:
MultipleObjectsReturned
- get_next_by_created_on(*, field=<django.db.models.fields.DateTimeField: created_on>, is_next=True, **kwargs)
- get_previous_by_created_on(*, field=<django.db.models.fields.DateTimeField: created_on>, is_next=False, **kwargs)
- id
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- objects = <django.db.models.manager.Manager object>
- shop_id
- user_id
- class shuup.gdpr.models.GDPRUserConsentDocument(id, page, version)[source]
Bases:
Model
- page
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- version
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- exception DoesNotExist
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned
Bases:
MultipleObjectsReturned
- gdpruserconsent_set
Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
Pizza.toppings
andTopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- id
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- objects = <django.db.models.manager.Manager object>
- page_id
- version_id
- class shuup.gdpr.models.GDPRCookieCategoryTranslation(id, language_code, name, how_is_used, master)
Bases:
TranslatedFieldsModel
- exception DoesNotExist
Bases:
TranslationDoesNotExist
,DoesNotExist
,DoesNotExist
- exception MultipleObjectsReturned
Bases:
MultipleObjectsReturned
- get_language_code_display(*, field=<parler.utils.compat.HideChoicesCharField: language_code>)
- how_is_used
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- id
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- master
The mandatory Foreign key field to the shared model.
- master_id
- name
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- objects = <django.db.models.manager.Manager object>
- class shuup.gdpr.models.GDPRSettingsTranslation(id, language_code, cookie_banner_content, cookie_privacy_excerpt, auth_consent_text, master)
Bases:
TranslatedFieldsModel
- exception DoesNotExist
Bases:
TranslationDoesNotExist
,DoesNotExist
,DoesNotExist
- exception MultipleObjectsReturned
Bases:
MultipleObjectsReturned
- auth_consent_text
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- cookie_banner_content
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- cookie_privacy_excerpt
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- get_language_code_display(*, field=<parler.utils.compat.HideChoicesCharField: language_code>)
- id
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- master
The mandatory Foreign key field to the shared model.
- master_id
- objects = <django.db.models.manager.Manager object>
shuup.gdpr.providers module
- class shuup.gdpr.providers.GDPRFormDefProvider(source, request, **kwargs)[source]
Bases:
FormDefProvider
- class shuup.gdpr.providers.GDPRFieldProvider(**kwargs)[source]
Bases:
FormFieldProvider
- error_message = ''
- class shuup.gdpr.providers.GDPRRegistrationFieldProvider(**kwargs)[source]
Bases:
GDPRFieldProvider
- error_message = 'You must accept this in order to register.'
- class shuup.gdpr.providers.GDPRCheckoutFieldProvider(**kwargs)[source]
Bases:
GDPRFieldProvider
- error_message = 'You must accept this to order.'
- class shuup.gdpr.providers.GDPRAuthFieldProvider(**kwargs)[source]
Bases:
GDPRFieldProvider
- error_message = 'You must accept this in order to authenticate.'
shuup.gdpr.receivers module
- shuup.gdpr.receivers.create_consents_company_registration_save(sender, request, user, company, *args, **kwargs)[source]
shuup.gdpr.resources module
shuup.gdpr.serializers module
- class shuup.gdpr.serializers.ContactLogEntrySerializer(*args, **kwargs)[source]
Bases:
ModelSerializer
When a field is instantiated, we store the arguments that were used, so that we can present a helpful representation of the object.
- class shuup.gdpr.serializers.CompanyContactLogEntrySerializer(*args, **kwargs)[source]
Bases:
ContactLogEntrySerializer
When a field is instantiated, we store the arguments that were used, so that we can present a helpful representation of the object.
- class shuup.gdpr.serializers.PersonContactLogEntrySerializer(*args, **kwargs)[source]
Bases:
ContactLogEntrySerializer
When a field is instantiated, we store the arguments that were used, so that we can present a helpful representation of the object.
- class shuup.gdpr.serializers.GDPRConsentDocumentSerializer(*args, **kwargs)[source]
Bases:
Serializer
When a field is instantiated, we store the arguments that were used, so that we can present a helpful representation of the object.
- class shuup.gdpr.serializers.GDPRConsentCookieCategorySerializer(*args, **kwargs)[source]
Bases:
ModelSerializer
When a field is instantiated, we store the arguments that were used, so that we can present a helpful representation of the object.
- class shuup.gdpr.serializers.GDPRConsentSerializer(*args, **kwargs)[source]
Bases:
ModelSerializer
When a field is instantiated, we store the arguments that were used, so that we can present a helpful representation of the object.
- class shuup.gdpr.serializers.UserSerializer(*args, **kwargs)[source]
Bases:
ModelSerializer
When a field is instantiated, we store the arguments that were used, so that we can present a helpful representation of the object.
- class shuup.gdpr.serializers.AddressSerializer(*args, **kwargs)[source]
Bases:
ModelSerializer
When a field is instantiated, we store the arguments that were used, so that we can present a helpful representation of the object.
- class shuup.gdpr.serializers.OrderLineSerializer(*args, **kwargs)[source]
Bases:
ModelSerializer
When a field is instantiated, we store the arguments that were used, so that we can present a helpful representation of the object.
- class shuup.gdpr.serializers.OrderSerializer(*args, **kwargs)[source]
Bases:
ModelSerializer
When a field is instantiated, we store the arguments that were used, so that we can present a helpful representation of the object.
- class shuup.gdpr.serializers.SavedAddressSerializer(*args, **kwargs)[source]
Bases:
ModelSerializer
When a field is instantiated, we store the arguments that were used, so that we can present a helpful representation of the object.
- class shuup.gdpr.serializers.CoreBasketSerializer(*args, **kwargs)[source]
Bases:
ModelSerializer
When a field is instantiated, we store the arguments that were used, so that we can present a helpful representation of the object.
- class shuup.gdpr.serializers.FrontSavedBasketSerializer(*args, **kwargs)[source]
Bases:
ModelSerializer
When a field is instantiated, we store the arguments that were used, so that we can present a helpful representation of the object.
- class shuup.gdpr.serializers.ContactSerializer(*args, **kwargs)[source]
Bases:
ModelSerializer
When a field is instantiated, we store the arguments that were used, so that we can present a helpful representation of the object.
- class shuup.gdpr.serializers.GDPRCompanyContactSerializer(*args, **kwargs)[source]
Bases:
ModelSerializer
When a field is instantiated, we store the arguments that were used, so that we can present a helpful representation of the object.
- class shuup.gdpr.serializers.GDPRPersonContactSerializer(*args, **kwargs)[source]
Bases:
ContactSerializer
When a field is instantiated, we store the arguments that were used, so that we can present a helpful representation of the object.
shuup.gdpr.settings module
shuup.gdpr.signal_handlers module
shuup.gdpr.urls module
shuup.gdpr.utils module
- shuup.gdpr.utils.get_cookie_consent_data(cookie_categories, consent_documents)[source]
- Parameters:
cookie_categories (list[GDPRCookieCategory]) – list of cookie category
- shuup.gdpr.utils.is_documents_consent_in_sync(shop, user)[source]
Returns whether the user has consent to the lastest document versions
shuup.gdpr.views module
- class shuup.gdpr.views.GDPRCookieConsentView(**kwargs)[source]
Bases:
View
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
- class shuup.gdpr.views.GDPRPolicyConsentView(**kwargs)[source]
Bases:
View
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
- class shuup.gdpr.views.GDPRCustomerDashboardView(**kwargs)[source]
Bases:
DashboardViewMixin
,TemplateView
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
- template_name = 'shuup/gdpr/edit_customer_data.jinja'