Closed andrewvillano closed 11 months ago
@andrewvillano
I'm getting ModuleNotFoundError: No module named 'settings', whether or not I export DJANGO_SETTINGS_MODULE, prepend the appname to settings, run it in the parent or child directory, or use django-admin.py, django-admin or manage.py.
Same error.
@andrewvillano have you installed Django ? Can you provide me complete steps you followed from start right from installing python and its packages etc.... setting env vars. Have you created any django project ? I need complete process you followed so I can understand whats missing.
I am running fedora 38,
[andrew@villano-vm reports]$ cat /etc/redhat-release
Fedora release 38 (Thirty Eight)
Using system python3
[andrew@villano-vm reports]$ python -V
Python 3.11.3
I installed ibm-db, tested it, then installed ibm-db-django.
[andrew@villano-vm reports]$ pip show ibm-db
Name: ibm-db
Version: 3.1.4
[andrew@villano-vm reports]$ pip show ibm-db-django
Name: ibm-db-django
Version: 1.5.2.0
I installed django3 from the system dnf repository (as I understand django v4 is not supported yet).
[andrew@villano-vm reports]$ rpm -q python3-django3
python3-django3-3.2.18-1.fc38.noarch
The only environment variables set are for Informix.
[andrew@villano-vm reports]$ env | grep -i DJANGO
PWD=/home/andrew/development/django/reports/reports
DJANGO_SETTINGS_MODULE=
OLDPWD=/home/andrew/development/django/reports
I then created a project with django-admin startproject myproj
. To be sure, i also created another fresh project django-admin startproject reports
. Neither project was able to run the command.
That's where I stand.
@andrewvillano were you able to resolve this ?
No
@andrewvillano try running like "python manage.py migrate" "python manage.py test inspectdb"
If not worked, send me contents of your settings.py file.
Closing this as no response from user.
I reached this page from the IBM Documentation that shows support for Informix v11+, https://www.ibm.com/docs/en/db2/9.7?topic=applications-python-sqlalchemy-django-framework
Latest version of the same document: https://www.ibm.com/docs/en/db2/11.5?topic=applications-python-sqlalchemy-django-framework
I have setup my Informix 14.x.x instance to use DRDA, which is the DB2 communication protocol.
The ibm-db python library supports informix, and I am able to extract data, however when I use ibm-db-django and run
python manage.py inspectdb
it returns an empty schema:Is there something I am missing?
Thanks.