How do you import a custom module with Gunicorn in a Procfile when deploying to Heroku? How do you import a custom module with Gunicorn in a Procfile when deploying to Heroku? flask flask

How do you import a custom module with Gunicorn in a Procfile when deploying to Heroku?


Python 3.x doesn't support relative imports the way you've done them. You need to update your import:

from .registration_form import RegistrationForm

Alternatively, you can do an absolute import:

from app.registration_form import RegistrationForm