如何在我的项目中安装django-scheduler。我收到一个错误说明模块无法导入 [英] how to install django-scheduler in my project. I am getting an error saying module cannot be imported
问题描述
我正在尝试将Django-scheduler中的django包添加到我的项目中。请让我通过步骤,我如何安装它,然后运行在我的项目。
提前感谢
I am trying to add the django package know as Django-scheduler in to my project. Please walk me through it by steps as how I have to install it and then run in my project. Thanks in advance.
推荐答案
我是django-scheduler项目的贡献者之一
I am one of the contributors of the django-scheduler project
在您的env上安装django调度程序,请执行以下步骤:
for install django scheduler on your env please ejecute the following steps:
pip instal django-scheduler
添加到您的django settings.py 调度程序应用程序在项目名称中出现r!):
add to your django settings.py the scheduler app (watch out the "r" on project name here!):
INSTALLED_APPS += ('schedule',)
我刚刚注意到,您需要将已安装的应用程序schedule而不是scheduler(这将是固定的
I just noticed that you need to put as installed app "schedule" instead of "scheduler" (this is going to be fixed in next version.
添加到 TEMPLATE_CONTEXT_PROCESSORS :
django.core.context_processors.request
然后同步您的数据库:
python manage.py syncdb
请提供一个例子你如何使用django-scheduler或你如何导入它(我将编辑这个答案asap)。
please provide an example of how you are using the django-scheduler or how you are importing it (I will edit this answer asap).
这篇关于如何在我的项目中安装django-scheduler。我收到一个错误说明模块无法导入的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!