aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/db/mongo
Commit message (Collapse)AuthorAgeFilesLines
* Turn media.get_uploader into a propertyElrond2011-12-271-1/+2
| | | | | | | sqlalchemy gives autoloading (hopefully caching) link to other objects as properties. So turn get_uploader on the current mongo based stuff into a property to ease transition.
* Use media.url_for_self instead of calling urlgen directlyElrond2011-12-271-8/+4
| | | | | | | | | Replace urlgen('ID', user=media.get_uploader().username, media=media.*) by media.url_for_self(urlgen) in a few places. It's just a lot nicer!
* Move verification key generation to viewElrond2011-12-271-2/+0
| | | | | | | | Instead of creating the email verication key on the db model as a default for the field, create it in the registration view. Now all verification key generation is only in auth/views.py!
* Turn MediaComment's author() into get_author propertyElrond2011-12-231-1/+2
| | | | | | | | | 1) MediaComment's author method conflicts with the author field. So rename it to get_author. 2) Turn it from a normal function into a python property. That means you call it by ".get_author" not by ".get_author()". This is exactly what sqlalchemy gives us free of charge.
* Move db/models.py -> db/mongo/models.pyElrond2011-12-202-1/+364
| | | | | To my surprise, there was only ONE reference to models.py. From open.py.
* Move db/migrations.py -> db/mongo/migrations.pyElrond2011-12-201-0/+110
| | | | And change references.
* Move db/util.py -> db/mongo/util.pyElrond2011-12-201-0/+292
| | | | | - Change some reference - Provide a wrapper db/util.py
* Move db/indexes.py to db/mongo/indexes.pyElrond2011-12-201-0/+146
| | | | And change references (one!).
* Move db/open.py to db/mongo/open.pyElrond2011-12-202-0/+70
Starting to move the mongo specific stuff into db/mongo. And create thin "from db.mongo.Y import z" wrappers in db/Y.py. Why? 1) Will make it lots easier to switch to sql for testing/developing. 2) The mongo stuff needs to stay around after moving to sql, because the converter needs it.