aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/tools/pagination.py
Commit message (Collapse)AuthorAgeFilesLines
* Remove ObjectId from the treeSebastian Spaeth2012-12-251-1/+1
| | | | | | | This was one of the last remaining Mongo holdouts and has been removed from the tree herewith. Good bye, ObjectId. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* RIP out mongoSebastian Spaeth2012-12-251-1/+1
| | | | | | | | | Since sqlalchemy is providing our database abstraction and we have moved away from Mongo as the underlying database, it is now time to simplify things and rip out mongo. This provides the bulk of the changes, and can stand on its own. There are some followup tasks that can be done, such as removing now unneeded abstraction layers, e.g. db.sql.fake.py
* Remove Mongoism query.skip()Sebastian Spaeth2012-12-211-2/+5
| | | | | | | | | | sqlalchemy supports slice() or [n:m] just fine. Right now, it seems we cannot distinguish beween "empty" results and out-of bound slices. It would be nice if we could distinguish these somehow. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* Move DBModel._id -> DBModel.idSebastian Spaeth2012-12-211-2/+2
| | | | | | | | | | | | | | | | | | | | | | | 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>
* Fixed pylint issues, removed unused importJoar Wandborg2012-10-021-1/+0
|
* Changed copy.copy(get_params) to dict(get_params)Joar Wandborg2012-09-301-1/+1
| | | | | in pagination because request.GET/request.args is immutable since the switch to werkzeug.
* It's 2012 all up in hereChristopher Allan Webber2012-02-021-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.
* Merge remote-tracking branch 'remotes/nyergler/pep8-ification'Christopher Allan Webber2011-11-131-7/+9
| | | | | | | | Conflicts: mediagoblin/db/migrations.py mediagoblin/db/models.py mediagoblin/user_pages/views.py mediagoblin/util.py
* i592: Use full path in various placesElrond2011-10-031-1/+1
| | | | | | | | | | | | | | | | When running mediagoblin in a sub path on a web server, most things inside mediagoblin need the "inside path", but when generating URLs for the webbrowser, full paths are needed. urlgen and routes already do that. Some (mostly pagination and login) need the URL of the current page. They used request.path_info. But this is the "inside" path, not the full. So now there is request.full_path and its used in various places.
* Finished splitting util.py into separate files.Aaron Williamson2011-10-011-0/+109