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

289
Vistas
How to run Django project locally for Heroku

I have a Django project and the structure is as following,

enter image description here

enter image description here

Inside the Procfile, I have this code,

web: gunicorn team-app.wsgi --log-file -

This is the requirements.txt,

appdirs==1.4.3
coreapi==2.3.0
coreschema==0.0.4
dj-database-url==0.4.2
Django==1.11
django-allauth==0.31.0
django-rest-auth==0.9.1
django-rest-swagger==2.1.2
djangorestframework==3.6.2
gunicorn==19.7.1
itypes==1.1.0
Jinja2==2.9.6
MarkupSafe==1.0
oauthlib==2.0.2
openapi-codec==1.3.1
packaging==16.8
pyparsing==2.2.0
python-openid==2.2.5
pytz==2017.2
requests==2.13.0
requests-oauthlib==0.8.0
simplejson==3.10.0
six==1.10.0
uritemplate==3.0.0
whitenoise==3.3.0

env is the virtualenv installed locally. When I enter in the root folder, team-app and run the command heroku local web, I get the following error,

enter image description here

enter image description here

So, the issue is ImportError: No module named team-app.wsgi and I believe the location of the Procfile or something is not correct. The wsgi.py file in the users_groups is as following,

"""
WSGI config for users_groups project.

It exposes the WSGI callable as a module-level variable named ``application``.

For more information on this file, see
https://docs.djangoproject.com/en/1.11/howto/deployment/wsgi/
"""

import os

from django.core.wsgi import get_wsgi_application

os.environ.setdefault("DJANGO_SETTINGS_MODULE", "users_groups.settings")

application = get_wsgi_application()

I can provide additional informations if required. How to solve this issue?

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

There are two problems here. The first is Django-related:

ImportError: No module named team-app.wsgi

Your wsgi.py file is located in the users_groups/ directory so your Procfile should reference users_groups.wsgi:

web: gunicorn users_groups.wsgi --log-file -

The name of the top-level directory that contains the entire project is irrelevant.

The second problem is Heroku-related. Heroku expects the Django directory to be the root of your repository. Moving Procfile into src/, then running heroku local web should get you up and running locally.

When you deploy to Heroku you'll have to make sure your current src/ directory is your root directory. That may mean moving some files into src/ and recreating / refactoring your Git repository there, or it could mean moving everything that's currently in src/ up a level.

over 4 years ago · Santiago Trujillo Denunciar
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