Cleaned up .gitignor, PEP-8 issues and documentation

This commit is contained in:
Jens Alm
2013-06-02 11:11:37 +02:00
parent a0da0ea713
commit 807f38a240
4 changed files with 8 additions and 5 deletions

1
.gitignore vendored
View File

@@ -1,4 +1,3 @@
.idea/
.DS_Store
._*
*.pyc

View File

@@ -6,5 +6,6 @@ if sys.version < '3':
return x
else:
import codecs
def b(x):
return codecs.latin_1_encode(x)[0]

View File

@@ -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"

View File

@@ -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: