[PYTHON] [Django] Rename the project

Introduction

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

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.

in conclusion

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

[Django] Rename the project
Django Project Baseline
Django project environment construction
Django --start project without start project
[Django] css in the project cannot be read
Start a Django project
Django Getting Started: 2_ Project Creation
Rename table columns in Django3
Paver Application-Incorporate into the project
Shell to create django project
Rename an existing Django application
django project development environment construction
Deploy django project to heroku
How to do the initial setup from Django project creation
[Note] Django project creation and terminology
Dive into the Django Custom command [1]
Steps to create a Django project
DJango Memo: From the beginning (preparation)
Django
Try Ajax on the Django page
Switch the language displayed in Django 1.9
Stumble when doing the django 1.7 tutorial
Get the value from the [Django] Form
Deploy the Django tutorial to IIS ①
The meaning of ".object" in Django
Start Django for the first time
Get the query string (query string) in Django
Consider the description of Dockerfile (Django + MySQL②)
Get the client's IP address in Django
DJango Memo: From the beginning (model settings)
I tried the asynchronous server of Django 3.0
Understand the benefits of the Django Rest Framework
Django ~ Let's display it in the browser ~
How to check the version of Django
Miscellaneous notes about the Django REST framework
Commands for creating a new django project
Deploy the Django app on Heroku [Part 2]
Deploy the Django app on Heroku [Part 1]
CentOS8 + Apache2.4 + pyenv + mod_wsgi + Django project deployment
Django Project HTTPS Server Settings: Let's Encrypt
Django project structure customization (splitting and structuring)
DJango Note: From the beginning (form processing)
Try hitting the Spotify API in Django.
Django doesn't search templates under the application
Get only the text from the Django form.
Consider the description of docker-compose.yml (Django + MySQL ③)
Redo everything for the Django login screen
[Python] Introduce UIKit3 to your Django project
Create a Django project and application in a Python virtual environment and start the server