My RESTful web service uses djangorestframework
for RESTful web services, while I need to use mongodbengine
to connect to MongoDB.
The problem is that they both have conflicting sets of requirements. While djangorestframework
requires Django 1.7+, the mongodbengine
is dependent on Django-nonrel 1.6.11 (forked version of Django).
The conflicting dependency is django.apps
, which was added in Django 1.7. and it is required by djangorestframework
.
How can I resolve the dependency problem, while still having both MongoDB and RESTful web services supported?
The full error:
No module named apps
Request Method: GET
Request URL: http://www.somedomain.com/
Django Version: 1.6.11
Exception Type: ImportError
Exception Value:
No module named apps
Exception Location: /usr/local/lib/python2.7/dist-packages/rest_framework/utils/model_meta.py in <module>, line 11
Python Executable: /usr/bin/python
Python Version: 2.7.6
Python Path:
['/home/ubuntu/workspace/djangoserver',
'/home/ubuntu/workspace/djangoserver',
'/home/ubuntu/lib/python/site-packages',
'/usr/lib/python2.7',
'/usr/lib/python2.7/plat-x86_64-linux-gnu',
'/usr/lib/python2.7/lib-tk',
'/usr/lib/python2.7/lib-old',
'/usr/lib/python2.7/lib-dynload',
'/usr/local/lib/python2.7/dist-packages',
'/usr/lib/python2.7/dist-packages',
'/usr/lib/python2.7/dist-packages/PILcompat',
'/usr/lib/python2.7/dist-packages/gtk-2.0',
'/usr/lib/pymodules/python2.7']
Server time: Thu, 26 Nov 2015 13:44:30 +0000
Is caused by:
from rest_framework import routers, serializers, viewsets