Allow .id instead of ._id for the Mongo backend
authorElrond <elrond+mediagoblin.org@samba-tng.org>
Sun, 25 Dec 2011 15:01:59 +0000 (16:01 +0100)
committerElrond <elrond+mediagoblin.org@samba-tng.org>
Sat, 25 Feb 2012 13:10:57 +0000 (14:10 +0100)
commit58f96a13e463fb417968cc92ec2ac5d4404641e4
treea213ee4c35b23e4722d3e38baf209abf9bd755d4
parent98913512561e10d409e1cce067b4ed42b72e337c
Allow .id instead of ._id for the Mongo backend

To allow easier migration to the SQLAlchemy style .id give
the User and MediaEntry mongo classes an alias attribute of
.id that maps to ['_id'].

Use it in the upload process, because this was one of the
last positions with a ['_id'] instead of ._id (due to a bug
in mongokit).
mediagoblin/db/mongo/models.py
mediagoblin/submit/views.py