I need to run my Django along with Celery as root for access reasons. It says I need to set C_FORCE_ROOT environment variable. How/where do I set the environment variable?
相关问题
- Django __str__ returned non-string (type NoneType)
- Is shmid returned by shmget() unique across proces
- Django & Amazon SES SMTP. Cannot send email
- Django check user group permissions
- Django restrict pages to certain users
Anywhere so the python process picks it up by using
os.environ
.If your question is about how the environment variables work, please read this tutorial.
1st solution - Manually type command at terminal
2nd solution - Edit shell configuration
3rd solution - Edit
manage.py
of DjangoYou can set it to true like this:
Then make sure it is set as an env. variable
But make sure to make it permanent, as this will vanish with the next restart
Have fun :) !!