I bumped into an issue when trying to set up a Django + React environment by following this tutorial on my NameCheap space.
No matter how I tried configuring Django’s
Nothing was mentioned in the tutorial for any potential issues like this, until I found an answer in this post.
It turns out to be a WSGI problem and it has nothing to do with Django’s or React’s configurations.
By making changes in my
import os from django.conf import settings from django.contrib.staticfiles.handlers import StaticFilesHandler from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'project.settings') if settings.DEBUG: application = StaticFilesHandler(get_wsgi_application()) else: application = get_wsgi_application()
where you need to replace the
'project.settings' string with your project name’s.