How to Change your django Project name


It's possible to rename a project in django. you just have to replace your existing project name in the following places with the new one.

Your django project structure

ProjectName/
         manage.py 
         ProjectName/ 
                 __init__.py 
                 settings.py 
                 urls.py 
                 wsgi.py

Rename your project directory (ProjectName) and the following inside your project directory.

settings.py

ROOT_URLCONF = 'NewProjectName.urls'
WSGI_APPLICATION = 'NewProjectName.wsgi.application'

wsgi.py

os.environ.setdefault("DJANGO_SETTINGS_MODULE", "NewProjectName.settings")

manage.py

os.environ.setdefault("DJANGO_SETTINGS_MODULE", "NewProjectName.settings")


There is no need to make any changes to any of your apps.

Comments

Popular posts from this blog

How to Install Antlr4 in Ubuntu/Linux

How to install python-gst (pygst) in ubuntu 16.04

How to make a gui Calculator in Python using Tkinter