问题
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.
Here is my url
url(r'^admin/', include(admin.site.urls)),
Here is settings.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'
Do I have to add anything additional to access admin/djcelery/
?
回答1:
I assume that you have already installed package
pip install django-celery
make sure you added it in INSTALLED_APPS
INSTALLED_APPS += ("djcelery", )
and run migrate
python manage.py migrate djcelery
if it still does not load you can glance Detailed Documentation
来源:https://stackoverflow.com/questions/32688101/accessing-http-localhost8080-admin-djcelery-returns-403-in-django