def index(request):
enable_hstore()
try:
if request.method == 'POST':
json_data = json.loads(request.body)
meta = json_data[u'meta']
# API v1
if meta[u'v'] == 1:
return handle_v1(json_data)
else:
raise NonImplementedVersionException()
except IntegrityError as e:
logging.warning(e.message)
logging.warning("Forcing full sync from pipedrive")
PipedriveModel.sync_from_pipedrive()
return HttpResponse("Hello, world!")
评论列表
文章目录