python - Setting up MongoDB + Django -


i new mongo db , django. i've been trying use mongo db primary database django. i've installed mongodb , django-nonrel per following link:

django - mongodb setup

the version of django-nonrel, using 1.7. clone link it:

pip install git+https://github.com/django-nonrel/django@nonrel-1.7

after following steps, settings.py in django project file looks this:

databases = {     'default': {         'engine': 'django_mongodb_engine',         'name': 'blink',         'user': '',         'password': '',         'host': '127.0.0.1',         'port': 1234,     } }  installed_apps = (     'djangotoolbox', ) 

but while running manage.py using following command:

python manage.py runserver 

i getting error this,

system check identified no issues (0 silenced). unhandled exception in thread started <function check_errors.<locals>.wrapper @ 0x104a95f80>     traceback (most recent call last):       file "/users/sunilkumar/blink/lib/python3.3/site-packages/django/utils/autoreload.py", line 222, in wrapper         fn(*args, **kwargs)       file "/users/sunilkumar/blink/lib/python3.3/site-packages/django/core/management/commands/runserver.py", line 107, in inner_run         self.check_migrations()       file "/users/sunilkumar/blink/lib/python3.3/site-packages/django/core/management/commands/runserver.py", line 159, in check_migrations         executor = migrationexecutor(connections[default_db_alias])       file "/users/sunilkumar/blink/lib/python3.3/site-packages/django/db/utils.py", line 242, in __getitem__         backend = load_backend(db['engine'])       file "/users/sunilkumar/blink/lib/python3.3/site-packages/django/db/utils.py", line 108, in load_backend         return import_module('%s.base' % backend_name)       file "/users/sunilkumar/blink/lib/python3.3/importlib/__init__.py", line 90, in import_module         return _bootstrap._gcd_import(name[level:], package, level)       file "<frozen importlib._bootstrap>", line 1584, in _gcd_import       file "<frozen importlib._bootstrap>", line 1565, in _find_and_load       file "<frozen importlib._bootstrap>", line 1532, in _find_and_load_unlocked       file "<frozen importlib._bootstrap>", line 584, in _check_name_wrapper       file "<frozen importlib._bootstrap>", line 1022, in load_module       file "<frozen importlib._bootstrap>", line 1003, in load_module       file "<frozen importlib._bootstrap>", line 560, in module_for_loader_wrapper       file "<frozen importlib._bootstrap>", line 853, in _load_module       file "<frozen importlib._bootstrap>", line 980, in get_code       file "<frozen importlib._bootstrap>", line 313, in _call_with_frames_removed       file "/users/sunilkumar/blink/lib/python3.3/site-packages/django_mongodb_engine/base.py", line 265         raise improperlyconfigured, exc_info[1], exc_info[2]                                   ^     syntaxerror: invalid syntax 

i not able understand error is. can please help.?

it seems using python 3. django-mongodb-engine, on django-nonrel depends, doesn't support python 3 yet.

the syntax error above valid in py3, not in py2. error.

perhaps should consider using py2 project.


Comments

Popular posts from this blog

jquery - How do you format the date used in the popover widget title of FullCalendar? -

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -