django_opt_out package¶
Subpackages¶
Submodules¶
django_opt_out.admin module¶
-
class
django_opt_out.admin.OptOutAdmin(model, admin_site)[source]¶ Bases:
import_export.admin.ImportExportMixin,django.contrib.admin.options.ModelAdmin-
date_hierarchy= 'ts'¶
-
list_display= ('ts', 'email', 'ip', 'host', 'ua')¶
-
list_filter= ('ip', 'host', 'ua', 'feedback', 'tags')¶
-
media¶
-
readonly_fields= ('email', 'ts', 'comment', 'ip', 'host', 'ua', 'cookies', 'data', 'ssl')¶
-
resource_class¶
-
-
class
django_opt_out.admin.OptOutFeedbackAdmin(model, admin_site)[source]¶ Bases:
import_export.admin.ImportExportMixin,django.contrib.admin.options.ModelAdmin-
inlines= [<class 'django_opt_out.admin.OptOutFeedbackTranslationInline'>]¶
-
list_display= ('text', 'slug', 'default', 'ordinal', 'all_tag_names')¶
-
list_filter= ('tags', 'default')¶
-
media¶
-
resource_class¶
-
-
class
django_opt_out.admin.OptOutFeedbackTranslationAdmin(model, admin_site)[source]¶ Bases:
import_export.admin.ImportExportMixin,django.contrib.admin.options.ModelAdmin-
list_display= ('text', 'language', 'feedback')¶
-
media¶
-
resource_class¶ alias of
django_opt_out.resources.OptOutFeedbackTranslationResource
-
django_opt_out.app_settings module¶
django_opt_out.apps module¶
django_opt_out.cli module¶
Console script for django-opt-out.
django_opt_out.factories module¶
-
class
django_opt_out.factories.OptOutFactory[source]¶ Bases:
factory.django.DjangoModelFactory-
email= <factory.faker.Faker object>¶
-
ts= <factory.declarations.LazyFunction object>¶
-
-
class
django_opt_out.factories.OptOutFeedbackFactory[source]¶ Bases:
factory.django.DjangoModelFactory-
text= <factory.faker.Faker object>¶
-
-
class
django_opt_out.factories.OptOutFeedbackTranslationFactory[source]¶ Bases:
factory.django.DjangoModelFactory-
feedback= <factory.declarations.SubFactory object>¶
-
language= 'pl'¶
-
text= <factory.faker.Faker object>¶
-
-
class
django_opt_out.factories.OptOutTagFactory[source]¶ Bases:
factory.django.DjangoModelFactory-
name= <factory.faker.Faker object>¶
-
-
class
django_opt_out.factories.OptOutTagValueFactory[source]¶ Bases:
factory.django.DjangoModelFactory-
opt_out= <factory.declarations.SubFactory object>¶
-
tag= <factory.declarations.SubFactory object>¶
-
-
class
django_opt_out.factories.UserFactory[source]¶ Bases:
factory.django.DjangoModelFactory-
email= <factory.faker.Faker object>¶
-
first_name= <factory.faker.Faker object>¶
-
is_active= True¶
-
is_staff= False¶
-
last_name= <factory.faker.Faker object>¶
-
username= <factory.declarations.Sequence object>¶
-
django_opt_out.forms module¶
-
class
django_opt_out.forms.OptOutForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, instance=None, use_required_attribute=None)[source]¶ Bases:
django.forms.models.ModelForm-
class
Meta[source]¶ Bases:
object-
fields= ('email', 'feedback', 'comment')¶
-
labels= {'comment': 'Please tell us what can we do better'}¶
-
model¶ alias of
django_opt_out.models.OptOut
-
-
base_fields= {'comment': <django.forms.fields.CharField object at 0x7eff14555b38>, 'email': <django.forms.fields.EmailField object at 0x7eff14555978>, 'feedback': <django_opt_out.forms.TranslatedMultipleChoiceField object at 0x7eff145556a0>}¶
-
declared_fields= {'feedback': <django_opt_out.forms.TranslatedMultipleChoiceField object at 0x7eff145556a0>}¶
-
media¶
-
class
django_opt_out.models module¶
-
class
django_opt_out.models.OptOut(id, email, ts, confirmed, data, comment, secret, ssl, host, ip, ua, cookies)[source]¶ Bases:
django_powerbank.db.models.base.BaseModel-
exception
DoesNotExist¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
comment¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
confirmed¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
data¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
email¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
feedback¶ 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.toppingsandTopping.pizzasareManyToManyDescriptorinstances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
-
get_next_by_ts(*, field=<django.db.models.fields.DateTimeField: ts>, is_next=True, **kwargs)¶
-
get_previous_by_ts(*, field=<django.db.models.fields.DateTimeField: ts>, is_next=False, **kwargs)¶
-
host¶ 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.
-
ip¶ 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>¶
-
save(force_insert=False, force_update=False, using=None, update_fields=None)[source]¶ Save the current instance. Override this in a subclass if you want to control the saving process.
The ‘force_insert’ and ‘force_update’ parameters can be used to insist that the “save” must be an SQL insert or update (or equivalent for non-SQL backends), respectively. Normally, they should not be set.
-
secret¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
ssl¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
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.childrenis aReverseManyToOneDescriptorinstance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
-
ts¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
ua¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
exception
-
class
django_opt_out.models.OptOutFeedback(id, text, slug, default, ordinal)[source]¶ Bases:
django_powerbank.db.models.base.BaseModel-
exception
DoesNotExist¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
default¶ 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.
-
objects= <django.db.models.manager.Manager object>¶
-
ordinal¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
out_outs¶ 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.toppingsandTopping.pizzasareManyToManyDescriptorinstances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
-
slug¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
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.toppingsandTopping.pizzasareManyToManyDescriptorinstances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
-
text¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
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.childrenis aReverseManyToOneDescriptorinstance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
-
exception
-
class
django_opt_out.models.OptOutFeedbackTranslation(id, feedback, language, text)[source]¶ Bases:
django_powerbank.db.models.base.BaseModel-
exception
DoesNotExist¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
feedback¶ 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.parentis aForwardManyToOneDescriptorinstance.
-
feedback_id¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
get_language_display(*, field=<django.db.models.fields.CharField: language>)¶
-
id¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
language¶ 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>¶
-
text¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
exception
-
class
django_opt_out.models.OptOutTag(id, name, description)[source]¶ Bases:
django_powerbank.db.models.base.BaseModel-
exception
DoesNotExist¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
description¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
feedback¶ 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.toppingsandTopping.pizzasareManyToManyDescriptorinstances.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.
-
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>¶
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.childrenis aReverseManyToOneDescriptorinstance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
-
exception
-
class
django_opt_out.models.OptOutTagValue(id, opt_out, tag, value)[source]¶ Bases:
django_powerbank.db.models.base.BaseModel-
exception
DoesNotExist¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
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>¶
-
opt_out¶ 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.parentis aForwardManyToOneDescriptorinstance.
-
opt_out_id¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
tag¶ 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.parentis aForwardManyToOneDescriptorinstance.
-
tag_id¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
value¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
exception
django_opt_out.resources module¶
-
class
django_opt_out.resources.OptOutFeedbackResource[source]¶ Bases:
import_export.resources.ModelResource-
class
Meta[source]¶ Bases:
object-
export_order= ('text',)¶
-
fields= ('id', 'text', 'slug', 'default', 'ordinal', 'tags')¶
-
model¶ alias of
django_opt_out.models.OptOutFeedback
-
-
fields= {'default': <import_export.fields.Field: default>, 'id': <import_export.fields.Field: id>, 'ordinal': <import_export.fields.Field: ordinal>, 'slug': <import_export.fields.Field: slug>, 'tags': <import_export.fields.Field: tags>, 'text': <import_export.fields.Field: text>}¶
-
class
-
class
django_opt_out.resources.OptOutFeedbackTranslationResource[source]¶ Bases:
import_export.resources.ModelResource-
class
Meta[source]¶ Bases:
object-
export_order= ('text',)¶
-
fields= ('id', 'feedback', 'text', 'language')¶
-
model¶
-
-
fields= {'feedback': <import_export.fields.Field: feedback>, 'id': <import_export.fields.Field: id>, 'language': <import_export.fields.Field: language>, 'text': <import_export.fields.Field: text>}¶
-
class
-
class
django_opt_out.resources.OptOutResource[source]¶ Bases:
import_export.resources.ModelResource-
class
Meta[source]¶ Bases:
object-
export_order= ('ts',)¶
-
fields= ('email', 'ts', 'confirmed', 'data', 'comment', 'feedback', 'secret', 'ssl', 'ip', 'ua', 'cookies')¶
-
model¶ alias of
django_opt_out.models.OptOut
-
-
fields= {'comment': <import_export.fields.Field: comment>, 'confirmed': <import_export.fields.Field: confirmed>, 'cookies': <import_export.fields.Field: cookies>, 'data': <import_export.fields.Field: data>, 'email': <import_export.fields.Field: email>, 'feedback': <import_export.fields.Field: tags>, 'ip': <import_export.fields.Field: ip>, 'secret': <import_export.fields.Field: secret>, 'ssl': <import_export.fields.Field: ssl>, 'ts': <import_export.fields.Field: ts>, 'ua': <import_export.fields.Field: ua>}¶
-
class
-
class
django_opt_out.resources.OptOutTagResource[source]¶ Bases:
import_export.resources.ModelResource-
class
Meta[source]¶ Bases:
object-
export_order= ('name',)¶
-
fields= ('id', 'name')¶
-
model¶ alias of
django_opt_out.models.OptOutTag
-
-
fields= {'id': <import_export.fields.Field: id>, 'name': <import_export.fields.Field: name>}¶
-
class
-
class
django_opt_out.resources.OptOutTagValueResource[source]¶ Bases:
import_export.resources.ModelResource-
class
Meta[source]¶ Bases:
object-
export_order= ('text',)¶
-
fields= ('opt_out', 'tag', 'value')¶
-
model¶ alias of
django_opt_out.models.OptOutTagValue
-
-
fields= {'opt_out': <import_export.fields.Field: tags>, 'tag': <import_export.fields.Field: tags>, 'value': <import_export.fields.Field: value>}¶
-
class
django_opt_out.signals module¶
django_opt_out.urls module¶
django_opt_out.utils module¶
django_opt_out.views module¶
-
class
django_opt_out.views.OptOutBase(**kwargs)[source]¶ Bases:
django_powerbank.views.auth.AbstractAccessView
-
class
django_opt_out.views.OptOutConfirm(**kwargs)[source]¶ Bases:
pascal_templates.views.CreateView-
form_class¶ alias of
django_opt_out.forms.OptOutForm
-
model¶ alias of
django_opt_out.models.OptOut
-
template_name= 'django_opt_out/OptOut/form.html'¶
-
-
class
django_opt_out.views.OptOutRemoved(**kwargs)[source]¶ Bases:
django.views.generic.base.TemplateView-
template_name= 'django_opt_out/OptOut/removed.html'¶
-
-
class
django_opt_out.views.OptOutSuccess(**kwargs)[source]¶ Bases:
django_opt_out.views.OptOutBase,pascal_templates.views.DetailView-
model¶ alias of
django_opt_out.models.OptOut
-
template_name= 'django_opt_out/OptOut/success.html'¶
-
-
class
django_opt_out.views.OptOutUpdate(**kwargs)[source]¶ Bases:
django_opt_out.views.OptOutBase,pascal_templates.views.UpdateView-
form_class¶ alias of
django_opt_out.forms.OptOutForm
-
model¶ alias of
django_opt_out.models.OptOut
-
template_name= 'django_opt_out/OptOut/form.html'¶
-
Module contents¶
Top-level package for Django Opt-out application.