I wanted to change the project name, so I changed it. environment python 3.6 Django 2.2
Directory structure
mysite/
├ manage.py #Change
└ mysite/
├ __init__.py
├ settings.py #Change
├ urls.py
└ wsgi.py #Change
Modify manage.py, settings.py, wsgi.py.
manage.py
def main():
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'mysite.settings') #here
...
settings.py
ROOT_URLCONF = 'mysite.urls' #here
...
WSGI_APPLICATION = 'mysite.wsgi.application' #here
wsgi.py
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'mysite.settings') #here
After that, I changed the folder name and it was no problem.
If it doesn't work, the old project name is hidden somewhere, so it seems that you should look under "Run / Debug Configuration", "Environment", and "Environment Variables". reference Rename project with python --django
Recommended Posts