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
|
||||
._*
|
||||
*.pyc
|
||||
|
||||
@@ -6,5 +6,6 @@ if sys.version < '3':
|
||||
return x
|
||||
else:
|
||||
import codecs
|
||||
|
||||
def b(x):
|
||||
return codecs.latin_1_encode(x)[0]
|
||||
@@ -16,6 +16,7 @@ import requests
|
||||
from djrill import MANDRILL_API_URL, signals
|
||||
from .compat import b
|
||||
|
||||
|
||||
class DjrillAdminMedia(object):
|
||||
def _media(self):
|
||||
js = ["js/core.js", "js/jquery.min.js", "js/jquery.init.js"]
|
||||
@@ -102,6 +103,7 @@ class DjrillWebhookSecretMixin(object):
|
||||
return super(DjrillWebhookSecretMixin, self).dispatch(
|
||||
request, *args, **kwargs)
|
||||
|
||||
|
||||
class DjrillWebhookSignatureMixin(object):
|
||||
|
||||
@method_decorator(csrf_exempt)
|
||||
@@ -136,6 +138,7 @@ class DjrillWebhookSignatureMixin(object):
|
||||
return super(DjrillWebhookSignatureMixin, self).dispatch(
|
||||
request, *args, **kwargs)
|
||||
|
||||
|
||||
class DjrillIndexView(DjrillApiMixin, TemplateView):
|
||||
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.
|
||||
|
||||
* 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
|
||||
.. _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:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user