Reputation: 13
I am trying to start up daphne for my Django project. The issue is that I am not able to set up the envirometnal variable for DJANGO_SETTINGS_MODULE.
I am using python venv.
Path of my project is as follows: C:\Users\HP ELITEBOOK\Documents\Projects\myenv\MyProject\MyProject\settings
I tried many different combinations already. I activate venv. I cd into "C:\Users\HP ELITEBOOK\Documents\Projects\myenv\MyProject" and use command:
set DJANGO_SETTINGS_MODULE=MyProject.settings
But when I try to check the variable with echo I still get only "%DJANGO_SETTINGS_MODULE%". Which to my understanding means the variable is not set.
EDIT
These are my cmd prompt inputs:
set DJANGO_SETTINGS_MODULE=MyProject.settings
echo %DJANGO_SETTINGS_MODULE%
output is:
%DJANGO_SETTINGS_MODULE%
Not exactly sure if the echo does what I think it will but the main point is that I keep getting the same error when starting daphne.
"Requested setting LOGGING_CONFIG, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings."
Upvotes: 0
Views: 86