Renaming the project is actually easier than renaming an app. This question explains how to rename an app.
To rename the project, you need to change the project name wherever it appears. grep -nir oldname . can help you find where it appears. In my case, I had to change the following places:
-
Rename the
oldprojectnamedirectory tonewprojectname -
manage.py: Changeos.environ.setdefault('DJANGO_SETTINGS_MODULE', 'oldprojectname.settings') -
newprojectname/wsgi.py: Changeos.environ.setdefault('DJANGO_SETTINGS_MODULE', 'oldprojectname.settings') -
newprojectname/settings.py: ChangeROOT_URLCONF = 'oldprojectname.urls'and changeWSGI_APPLICATION = 'oldprojectname.wsgi.application' -
newprojectname/urls.py: Change oldprojectname in a line I had added