aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/edit/lib.py
Commit message (Collapse)AuthorAgeFilesLines
* Move DBModel._id -> DBModel.idSebastian Spaeth2012-12-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | We were refering to model._id in most of the code base as this is what Mongo uses. However, each use of _id required a) fixup of queries: e.g. what we did in our find() and find_one() functions moving all '_id' to 'id'. It also required using AliasFields to make the ._id attribute available. This all means lots of superfluous fixing and transitioning in a SQL world. It will also not work in the long run. Much newer code already refers to the objects by model.id (e.g. in the oauth plugin), which will break with Mongo. So let's be honest, rip out the _id mongoism and live with .id as the one canonical way to address objects. This commit modifies all users and providers of model._id to use model.id instead. This patch works with or without Mongo removed first, but will break Mongo usage (even more than before) I have not bothered to fixup db.mongo.* and db.sql.convert (which converts from Mongo to SQL) Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* It's 2012 all up in hereChristopher Allan Webber2012-02-021-1/+1
|
* Dot-Notation for MediaEntry.uploaderElrond2011-12-051-1/+1
|
* Dot-Notation for Users.is_adminElrond2011-12-051-1/+1
|
* Dot-Notation for "_id"Elrond2011-11-151-1/+1
| | | | | | | | | Note: Migrations can't use "Dot Notation"! Migrations run on pymongo, not mongokit. So they can't use the "Dot Notation". This isn't really a big issue, as migrations are anyway quite mongo specific.
* 508. Updates copyright/license informationWill Kahn-Greene2011-09-011-1/+1
|
* Add GNU headers to new *.pyElrond2011-06-021-0/+16
|
* Handle Exceptions from save(); Move may_edit_mediaElrond2011-06-021-0/+8
Turn .save() excpetions into a HTTPConflict. Not nice, but at least the user gets the error. Until there is a proper way to validate things and get nice errors. Move may_edit_media() to lib.py, as it's not a view.