views.py 文件源码

python
阅读 31 收藏 0 点赞 0 评论 0

项目:django_pipedrive 作者: MasAval 项目源码 文件源码
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!")
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号