访问`http:// localhost:8080 / admin / djcelery /`在Django中返回403 [英] Accessing `http://localhost:8080/admin/djcelery/` returns 403 in Django
本文介绍了访问`http:// localhost:8080 / admin / djcelery /`在Django中返回403的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在Django管理员中访问 http:// localhost:8080 / admin / djcelery /
。我可以访问 http:// localhost:8080 / admin
,我可以运行芹菜任务,但是我无法访问djcelery管理站点。
I am trying to access http://localhost:8080/admin/djcelery/
in my Django admin. I can access http://localhost:8080/admin
, I can run celery task but I can't access the djcelery admin site.
这是我的网址
url(r'^admin/', include(admin.site.urls)),
这里是设置.py
import djcelery
djcelery.setup_loader()
BROKER_URL = "amqp://guest:guest@localhost:5672//"
CELERY_RESULT_BACKEND='djcelery.backends.database:DatabaseBackend'
CELERYBEAT_SCHEDULER = 'djcelery.schedulers.DatabaseScheduler'
我必须添加任何额外的访问 admin / djcelery /
?
Do I have to add anything additional to access admin/djcelery/
?
推荐答案
我假设你已经安装了
I assume that you have already installed package
pip install django-celery
确保您添加到 INSTALLED_APPS
INSTALLED_APPS += ("djcelery", )
并运行迁移
python manage.py migrate djcelery
如果仍然无法加载,您可以浏览
详细资料
if it still does not load you can glance Detailed Documentation
这篇关于访问`http:// localhost:8080 / admin / djcelery /`在Django中返回403的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文