Answer the question
In order to leave comments, you need to log in
How to rename a project correctly?
Renamed the project (meaning the folder that contains settings.py, wsgi.py, etc.). Corrected all imports and links. The project ends up with the following structure:
/var/www/notes/
project/
apps/
app1/
app2/
__init__.py
core/ <<< это раньше называлось "notes"
__init__.py
settings.py
wsgi.py
...
media/
static/
manage.py
venv/
./manage.py runserver
uwsgi --ini /etc/uwsgi/apps-available/notes.ini
Traceback (most recent call last):
File "./core/wsgi.py", line 16, in <module>
application = get_wsgi_application()
File "/var/www/notes/venv/lib/python3.4/site-packages/django/core/wsgi.py", line 14, in get_wsgi_application
django.setup()
File "/var/www/notes/venv/lib/python3.4/site-packages/django/__init__.py", line 17, in setup
configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
File "/var/www/notes/venv/lib/python3.4/site-packages/django/conf/__init__.py", line 48, in __getattr__
self._setup(name)
File "/var/www/notes/venv/lib/python3.4/site-packages/django/conf/__init__.py", line 44, in _setup
self._wrapped = Settings(settings_module)
File "/var/www/notes/venv/lib/python3.4/site-packages/django/conf/__init__.py", line 92, in __init__
mod = importlib.import_module(self.SETTINGS_MODULE)
File "/var/www/notes/venv/lib/python3.4/importlib/__init__.py", line 109, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ImportError: No module named 'notes'
[uwsgi]
plugin = python3
socket = /run/uwsgi/app/notes/socket
chdir = /var/www/notes/project
module = core.wsgi:application
home = /var/www/notes/venv
vacuum = True
master = True
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "core.settings")
application = get_wsgi_application()
Answer the question
In order to leave comments, you need to log in
Did you change it in settings?WSGI_APPLICATION = 'core.wsgi.application'
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question