Background info
Background Info can be found on my last post - Cannot import .py file into settings.py
Problem
When attempting to import a python file into settings.py I get an error
The code:
import test
Password = test.Password
The Error:
[wsgi:error] [pid 3908:tid 1496] import test\r
[wsgi:error] [pid 3908:tid 1496] ModuleNotFoundError: No module named 'test'\r
WSGIPythonPath set
In my D:\Apache24\conf\httpd.conf I have the WSGIPythonPath line set:
WSGIPythonPath D:\PythonEnvs\myenv\Lib\site-packages
However, test is just a python file I created titled test.py located in the same directory as settings.py. It does NOT exist in the folder site-packages like the other modules.
Note
I can import test into other python files. However, when I try and import test.py into settings.py I get an error 500 when restarting my Apache server and get the error above from the Problem section in my error logs.