MultipleObjectsReturned using MongoDB

180 views
Skip to first unread message

Ademar

unread,
Jul 8, 2011, 7:45:54 AM7/8/11
to Django users
hi,

im new in django and mongodb and im trying to use the admin with
mongodb.
i installed everything and there's no errors on the server but after i
access the admin page it gives me the error
'MultipleObjectsReturned at /admin/

get() returned more than one Session -- it returned 2! Lookup
parameters were {'session_key': 'c98dd3a7da992eb0e29073e4ec88eb3f',
'expire_date__gt': datetime.datetime(2011, 7, 8, 6, 39, 46, 801191)};

ok, from that i know there are 2 session with the same session_key, i
access the mongodb and i delete one of them and it works. Next time
i'll log in, the same error happens.

can someone help?

dele...@dudupay.com

unread,
Jul 8, 2011, 8:16:56 AM7/8/11
to django...@googlegroups.com
Whenever you use a get(), it is expecting to return one item. Use filter() and see if the error comes up again and then I can take a deeper look at the error.
Regards.
Sent from my BlackBerry wireless device from MTN
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django...@googlegroups.com.
To unsubscribe from this group, send email to django-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

Reply all
Reply to author
Forward
0 new messages