jschrewe / django-mongoadmin

Integrates mongodb into django's admin
http://www.schafproductions.com/projects/mongo-admin/
BSD 3-Clause "New" or "Revised" License
112 stars 38 forks source link

Error: No module named objectid #7

Closed phoolish closed 12 years ago

phoolish commented 12 years ago

I ran into this error when enabling mongoadmin in the INSTALLED_APPS array.

Django==1.4 MySQL-python==1.2.3 django-admin-tools==0.4.1 django-debug-toolbar==0.9.4 django-extensions==0.8 mongoadmin==0.1.3 mongodbforms==0.1.4 mongoengine==0.6.10 pymongo==2.2 wsgiref==0.1.2

m-vdb commented 12 years ago

@phoolish how did you solve this ? I ran into the same error...

jschrewe commented 12 years ago

I forgot to update the PyPI version. If you install it directly from github it should work.

m-vdb commented 12 years ago

okay thanks a lot :-)

m-vdb commented 12 years ago

sorry but i'm still getting the error when i execute python manage.py syncdb I use a sqlite3 backend. It worked completely fine before having mongoadmin installed.

pip freeze > Django==1.4.1 mongoadmin==0.1.3 mongodbforms==0.1.4 mongoengine==0.6.20 pymongo==2.2.1 wsgiref==0.1.2

and settings :

INSTALLED_APPS = ( 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages', 'django.contrib.staticfiles', 'mongoadmin', 'django.contrib.admin', 'polls', )

I tried several times, and this time I started from zero to be sure I was doing things the right way...

m-vdb commented 12 years ago

I think I found something : mongodbforms, in fields.py, imports pymongo.objectid which no longer exists for versions > 2.2, I replaced it with bson.objectid and I realized that the installed version of mongodbforms was 0.1.14, and the one on github is 0.1.15. It installed the wrong one by default.

Maybe it'll save some time for others