mongoengine

29 views
Skip to first unread message

B.navya spoorthi Sweety

unread,
Feb 4, 2019, 12:59:16 PM2/4/19
to Django users
hi all
 
i am trying django with mongo

i added following lines in settings.py

mongoengine.connect(
    db="tools",
    host="localhost"
)

i am seeing error 
  File "<frozen importlib._bootstrap_external>", line 697, in exec_module
  File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
  File "C:\c_burra_mongo_1\mysite\mysite\settings.py", line 124, in <module>
    mongoengine.connect(
NameError: name 'mongoengine' is not defined

i am aware that i need to change something here
DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.sqlite3',
        'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
    }
}

but not sure what to change
mongoengine error.JPG

thamma...@gmail.com

unread,
Feb 5, 2019, 7:17:50 AM2/5/19
to Django users
I am not sure but try to import mongoengine.

I am also trying many ways to get this combo integration.
Reply all
Reply to author
Forward
0 new messages