Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

333
Vistas
Django and docker, ImportError: Could not import settings '"config"' Is it on sys.path?

I'm step by step switching my django project to work on local from vagrant to docker.

With docker, you don't need a virtualenv. Even if I find it very convenient I'm facing some new troublesome issues.

The main one is this error on ./manage.py cmd:

ImportError: Could not import settings '"config"' (Is it on sys.path? Is there an import error in the settings file?): No module named '"config"'

So when I start the python console code and type:

>> import sys
>> sys.path
>> ['', '/usr/lib/python3.4', '/usr/lib/python3.4/plat-x86_64-linux-gnu', '/usr/lib/python3.4/lib-dynload', '/usr/local/lib/python3.4/dist-packages', '/usr/lib/python3/dist-packages']

But my path project is: /var/www/webapps/wrapper_website/app

I've a setup environment loaded on docker-compose up which contain: DJANGO_CONFIGURATION="LocalContent"

And that's what I'm trying to reach. The config folder is in: /var/www/webapps/wrapper_website/app/config

I've tried this in the wsgi.py:

import os
import sys
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config")
os.environ.setdefault("DJANGO_CONFIGURATION", "Production")
sys.path.insert(0, 
os.path.abspath(os.path.dirname(os.path.dirname(__file__)))) <- this line
from configurations.wsgi import get_wsgi_application

application = get_wsgi_application()

Without success.

over 4 years ago · Santiago Trujillo
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda