johnboxall / django_webhooks

Django WebHooks makes it easy to integrate WebHooks into your Django Project.

This URL has Read+Write access

django_webhooks / views.py
100644 21 lines (16 sloc) 0.485 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
from django.http import HttpResponse
 
VERIFIED = "VERIFIED"
INVALID = "INVALID"
 
# def verify(request):
# """
# Returns a HTTP/200 OKAY if this we sent this message.
#
# """
# if request.method == "POST" and verify(request.raw_post_data):
# return HttpResponse(VERIFIED)
# else:
# return HttpResponse(INVALID)
        
        
def listener(request):
    print request.get_full_path()
    print request.raw_post_data
    print request.POST