Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

331
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!