examples icon indicating copy to clipboard operation
examples copied to clipboard

bug in python django example in vercel_appl.settings.py

Open dannyfongdev opened this issue 2 years ago • 2 comments

Line 72 should be:

WSGI_APPLICATION = 'vercel_app.wsgi.app'

NOT:

WSGI_APPLICATION = 'vercel_app.wsgi.application'

If you do not change, you cannot run manage.py runserver locally. It will crash saying it can't load the module.

The example deploys fine. It just doesn't run locally.

dannyfongdev avatar Mar 01 '23 21:03 dannyfongdev

IMHO I'd suggest wrapping this in an environment check

dyspop avatar Mar 10 '23 08:03 dyspop

I am pointing out that vercel_apps/settings.py does not match the reference to vercel_apps/wsgi.py

SETTINGS.PY WSGI_APPLICATION = 'vercel_app.wsgi.application'

WSGI.PY app = get_wsgi_application()

PROBLEM 'application' != 'app'

That's why I am calling it a bug. If you download the code as-is, it will not run.

@dyspop I confused the matter by mentioning deployment. Thanks for your input on making an environment check.

dannyfongdev avatar Mar 13 '23 00:03 dannyfongdev