Techcombine电子商务框架
test2techcombine的Python项目详细描述
techcombine框架
为所有人安装
$pip install techcombine
开发者安装
^{pr2}$现在您可以使用pytest
或pytest direstory/
来测试这个包
$pytest# or$pytest .\techcombine\tests\
来源安装
(env)$python setup.py install
手册
类LINENotify
notify\u hook(): 从您的服务器使webhook到Line Notify 返回:请求
fromtechcombine.utilsimportgenerate_notify_dataLINENotify.notify_hook(subtitle,data=None:dict,**kwargs)# When you use this method you need to defind variable in django.conf settingsLINE_NOTIFY_TOKEN=somesting+'access_token'LINE_NOTIFY_API='https://notify-api.line.me/api/notify'# Data exampledata={"Order ID":order.slug,"email":order.email,"first_name":order.first_name,"phone_number":order.phone_number,"created_at":order.created_at,}# Or use generate_notify_data(ojb)
参数:
- subtitle:(str)是数据挂线通知聊天的子标题
- data:(默认值=None/DictType only)是要在邮件中显示的所有数据的dict
- 或使用**dict
generate_notify_data(): 从django模型对象生成dict数据。 return:notify_hook()中使用的dict数据格式
fromtechcombine.utilsimportgenerate_notify_datadata=generate_notify_data(ojb,key_type="id",header=None)
参数:
- obj:(Django models object)字段['对象id或者目标鼻涕虫{3','创建于''cdu'','
- key_type:(str)ID或Slug中的对象键的类型
- 用于填充对象链接url的头:(str)
- 项目
标签: