How to install django nonrel package

When I try to install pip install "git + https://github.com/django-nonrel/mongodb-engine " I get an error

ERROR:root:Error while trying to get django settings module.
    Error was: Requested setting INSTALLED_APPS, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.

And when you start the application that received this error

raise ImproperlyConfigured(error_msg)
django.core.exceptions.ImproperlyConfigured: 'django.db.backends.django_mongodb_engine' isn't an available database backend.
Try using 'django.db.backends.XXX', where XXX is one of:
    u'mysql', u'oracle', u'postgresql_psycopg2', u'sqlite3'
Error was: No module named django_mongodb_engine.base

What to do. Help me if anyone knows ...

+4
source share
1 answer

It seems that the first error is a package installation error. The mongodb-engine package has an odd dependency where it needs to insert itself as an “application” into a django project. For this reason, he should know where the corresponding "settings.py" is located.

, DJANGO_SETTINGS_MODULE 'settings.py'. (... , pip... , , ).

... , --, ​​ .

+1

Source: https://habr.com/ru/post/1523896/


All Articles