mirror of
https://github.com/pacnpal/django-anymail.git
synced 2025-12-20 11:51:05 -05:00
Cleaned up .gitignor, PEP-8 issues and documentation
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,4 +1,3 @@
|
|||||||
.idea/
|
|
||||||
.DS_Store
|
.DS_Store
|
||||||
._*
|
._*
|
||||||
*.pyc
|
*.pyc
|
||||||
|
|||||||
@@ -6,5 +6,6 @@ if sys.version < '3':
|
|||||||
return x
|
return x
|
||||||
else:
|
else:
|
||||||
import codecs
|
import codecs
|
||||||
|
|
||||||
def b(x):
|
def b(x):
|
||||||
return codecs.latin_1_encode(x)[0]
|
return codecs.latin_1_encode(x)[0]
|
||||||
@@ -16,6 +16,7 @@ import requests
|
|||||||
from djrill import MANDRILL_API_URL, signals
|
from djrill import MANDRILL_API_URL, signals
|
||||||
from .compat import b
|
from .compat import b
|
||||||
|
|
||||||
|
|
||||||
class DjrillAdminMedia(object):
|
class DjrillAdminMedia(object):
|
||||||
def _media(self):
|
def _media(self):
|
||||||
js = ["js/core.js", "js/jquery.min.js", "js/jquery.init.js"]
|
js = ["js/core.js", "js/jquery.min.js", "js/jquery.init.js"]
|
||||||
@@ -102,6 +103,7 @@ class DjrillWebhookSecretMixin(object):
|
|||||||
return super(DjrillWebhookSecretMixin, self).dispatch(
|
return super(DjrillWebhookSecretMixin, self).dispatch(
|
||||||
request, *args, **kwargs)
|
request, *args, **kwargs)
|
||||||
|
|
||||||
|
|
||||||
class DjrillWebhookSignatureMixin(object):
|
class DjrillWebhookSignatureMixin(object):
|
||||||
|
|
||||||
@method_decorator(csrf_exempt)
|
@method_decorator(csrf_exempt)
|
||||||
@@ -136,6 +138,7 @@ class DjrillWebhookSignatureMixin(object):
|
|||||||
return super(DjrillWebhookSignatureMixin, self).dispatch(
|
return super(DjrillWebhookSignatureMixin, self).dispatch(
|
||||||
request, *args, **kwargs)
|
request, *args, **kwargs)
|
||||||
|
|
||||||
|
|
||||||
class DjrillIndexView(DjrillApiMixin, TemplateView):
|
class DjrillIndexView(DjrillApiMixin, TemplateView):
|
||||||
template_name = "djrill/status.html"
|
template_name = "djrill/status.html"
|
||||||
|
|
||||||
|
|||||||
@@ -30,12 +30,12 @@ Your code can connect to this signal for further processing.
|
|||||||
reject calls without the correct key.
|
reject calls without the correct key.
|
||||||
|
|
||||||
* You can, optionally include the two settings :setting:`DJRILL_WEBHOOK_SIGNATURE_KEY`
|
* You can, optionally include the two settings :setting:`DJRILL_WEBHOOK_SIGNATURE_KEY`
|
||||||
and :setting:`DJRILL_WEBHOOK_URL` to enforce webhook signature checking
|
and :setting:`DJRILL_WEBHOOK_URL` to enforce `webhook signature`_ checking
|
||||||
|
|
||||||
|
|
||||||
.. _Mandrill webhooks: http://help.mandrill.com/entries/21738186-Introduction-to-Webhooks
|
.. _Mandrill webhooks: http://help.mandrill.com/entries/21738186-Introduction-to-Webhooks
|
||||||
.. _securing webhooks: http://apidocs.mailchimp.com/webhooks/#securing-webhooks
|
.. _securing webhooks: http://apidocs.mailchimp.com/webhooks/#securing-webhooks
|
||||||
.. _webhook signatures: http://help.mandrill.com/entries/23704122-Authenticating-webhook-requests
|
.. _webhook signature: http://help.mandrill.com/entries/23704122-Authenticating-webhook-requests
|
||||||
|
|
||||||
.. _webhooks-config:
|
.. _webhooks-config:
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user