Django与crontab兼容 [英] Django collecstatic with crontab
问题描述
我有一个带刮板的Django网站,每天都会下载图像,因此我想使用crontab
来使collectstatic自动化,我尝试将其添加到crontab.cr
I have Django website with scrapper which every day download images, so I want to automate collectstatic with crontab I tried this add to crontab.cr
yes | python2.7 manage.py collectstatic
但出现错误:
您已请求在设置中指定的目标
位置收集静态文件:
You have requested to collect static files at the destination location as specified in your settings:
/ home / mojbutik / webapps / webshop / myproject / static
/home/mojbutik/webapps/webshop/myproject/static
这将覆盖现有文件!
您确定要执行此操作吗?
This will overwrite existing files! Are you sure you want to do this?
CommandError:已取消收集静态文件。
CommandError: Collecting static files cancelled.
有人可以告诉我该怎么做...
Can someone tell me how to do it...
推荐答案
您尝试过该命令吗?
python manage.py collectstatic --noinput
python manage.py collectstatic --noinput
这篇关于Django与crontab兼容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!