Hello everyone,
First the context :
I work on Django 5.2 with PyCharm.
I practice on a little project first (my CV), and try to deploy it on my own Server.
It is a Shared server (french O2switch).
It uses Phusion Passenger to manage Python application.
On local, under Linux Ubuntu, obviously, the project works fine.
I configured the application on my server, but when starting I get the message “ModuleNotFoundError: No module named ‘profile’”
I think i have an issue about my settings.py file, but i stay stuck about how to resolve it
Here it is the structure of my app.
It was my first, so it’s not optimized, but I’ll do better next time
root/
|-cv/
|-- cv/
| |-- init.py
| |-- asgi.py
| |-- settings.py
| |-- urls.py
| |-- wsgi.py
|-- profil/
| |-- init.py
| |-- admin.py
| |-- apps.py
| |-- models.py
| |-- urls.py
| |-- views.py
| |-- manage.py
|- passenger_wsgi.py
Here is some of parameters for settings.py for local config :
BASE_DIR = Path(file).resolve().parent.parentSECRET_KEY =
os.getenv(‘SECRET_KEY’)
ALLOWED_HOSTS = [‘localhost’, ‘127.0.0.1’]
INSTALLED_APPS = [‘django.contrib.admin’,
‘django.contrib.auth’,
‘django.contrib.contenttypes’,
‘django.contrib.sessions’,
‘django.contrib.messages’,
‘django.contrib.staticfiles’,
‘mdeditor’,
‘profil’,
‘django_weasyprint’,
]
Here is some of parameters for settings.py for deployment config :
BASE_DIR = Path(file).resolve().parent.parentSECRET_KEY =
os.getenv(‘SECRET_KEY’)
ALLOWED_HOSTS = [‘mydomain.com’]
INSTALLED_APPS = [‘django.contrib.admin’,
‘django.contrib.auth’,
‘django.contrib.contenttypes’,
‘django.contrib.sessions’,
‘django.contrib.messages’,
‘django.contrib.staticfiles’,
‘mdeditor’,
‘profil’,
‘django_weasyprint’,
]
Any help is welcome to help me understand where the problem might be.
Thanks in advance.