我已经按照以下方式配置芹菜以使用json:
CELERY_ACCEPT_CONTENT = ['json']
CELERY_TASK_SERIALIZER = 'json'
CELERY_RESULT_SERIALIZER = 'json'
但是,当worker接收任务时,它会生成以下错误:
ContentDisallowed: Refusing to deserialize untrusted content of type pickle (application/x-python-serialize)
是否有一些我遗漏的东西,也许是无证件的.
在下面的 html 模板中,我试图获取百分比,格式为:
4%
但是当我执行乘法和除法时,它显示为
2/50*100
我怎样才能得到我想要的结果?
<div class="card-content collapse show">
<div class="card-body">
@foreach ($items->products as $i)
<div style="font-size:14px">{{$i->count}}/{{$total}}*100 %</div>
@endforeach
</div>
</div>
Run Code Online (Sandbox Code Playgroud)