pagetools.subscriptions package¶
Subpackages¶
- pagetools.subscriptions.management package
- pagetools.subscriptions.templatetags package
- pagetools.subscriptions.tests package
Submodules¶
pagetools.subscriptions.admin module¶
- class pagetools.subscriptions.admin.SubscriberAdmin(model, admin_site)[source]¶
Bases:
ModelAdmin- change_list_template = 'admin/subscriptions/subscriber/sub_change_list.html'¶
- date_hierarchy = 'subscribtion_date'¶
- list_display = ('email', 'subscribtion_date', 'is_activated')¶
- list_editable = ['is_activated']¶
- list_filter = ['is_activated']¶
- property media¶
- readonly_fields = ['subscribtion_date']¶
pagetools.subscriptions.base_models module¶
- class pagetools.subscriptions.base_models.BaseSubscriberMixin(*args, **kwargs)[source]¶
Bases:
Model- failures¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- get_next_by_subscribtion_date(*, field=<django.db.models.fields.DateTimeField: subscribtion_date>, is_next=True, **kwargs)¶
- get_previous_by_subscribtion_date(*, field=<django.db.models.fields.DateTimeField: subscribtion_date>, is_next=False, **kwargs)¶
- is_activated¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- subscribtion_date¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
pagetools.subscriptions.forms module¶
- class pagetools.subscriptions.forms.SubscribeForm(*args, **kwargs)[source]¶
Bases:
Form- base_fields = {'email': <django.forms.fields.EmailField object>}¶
- declared_fields = {'email': <django.forms.fields.EmailField object>}¶
- property media¶
Return all media required to render the widgets on this form.
pagetools.subscriptions.models module¶
- class pagetools.subscriptions.models.QueuedEmail(id, lang, createdate, modifydate, senddate, subject, body)[source]¶
Bases:
LangModel- exception DoesNotExist¶
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned¶
Bases:
MultipleObjectsReturned
- body¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- createdate¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- get_lang_display(*, field=<django.db.models.fields.CharField: lang>)¶
- get_next_by_createdate(*, field=<django.db.models.fields.DateTimeField: createdate>, is_next=True, **kwargs)¶
- get_next_by_modifydate(*, field=<django.db.models.fields.DateTimeField: modifydate>, is_next=True, **kwargs)¶
- get_next_by_senddate(*, field=<django.db.models.fields.DateTimeField: senddate>, is_next=True, **kwargs)¶
- get_previous_by_createdate(*, field=<django.db.models.fields.DateTimeField: createdate>, is_next=False, **kwargs)¶
- get_previous_by_modifydate(*, field=<django.db.models.fields.DateTimeField: modifydate>, is_next=False, **kwargs)¶
- get_previous_by_senddate(*, field=<django.db.models.fields.DateTimeField: senddate>, 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.
- lang¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- modifydate¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- save(*args, **kwargs)[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.
- senddate¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- sendstatus_set¶
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.
- subject¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- class pagetools.subscriptions.models.SendStatus(id, subscriber, queued_email, status)[source]¶
Bases:
Model- exception DoesNotExist¶
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned¶
Bases:
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>¶
- queued_email¶
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.
- queued_email_id¶
- status¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- subscriber¶
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.
- subscriber_id¶
- class pagetools.subscriptions.models.Subscriber(id, lang, is_activated, subscribtion_date, failures, key, email)[source]¶
Bases:
BaseSubscriberMixin,LangModel- exception DoesNotExist¶
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned¶
Bases:
MultipleObjectsReturned
- email¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- failures¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- get_lang_display(*, field=<django.db.models.fields.CharField: lang>)¶
- get_next_by_subscribtion_date(*, field=<django.db.models.fields.DateTimeField: subscribtion_date>, is_next=True, **kwargs)¶
- get_previous_by_subscribtion_date(*, field=<django.db.models.fields.DateTimeField: subscribtion_date>, 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.
- is_activated¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- key¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- lang¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- objects = <pagetools.models.LangManager object>¶
- sendstatus_set¶
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.
- subscribtion_date¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
pagetools.subscriptions.settings module¶
pagetools.subscriptions.urls module¶
pagetools.subscriptions.utils module¶
- pagetools.subscriptions.utils.send_queued_mail(mail: QueuedEmail, maxmails)[source]¶