解决方法
首先安装django-extensions
:
pip install django-extensions
然后把django-extensions
加入到setting.py
文件下的INSTALLED_APPS中:
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
"device_discover",
"django_crontab",
"django_extensions", # 嗷嗷嗷
]
最后就可以用
python manage.py clear_cache --all
显示:Cache "default" has been cleared!
就Ok啦