aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch '512_bump_video_js'Sebastian Spaeth2012-12-2512-4224/+191
|\
| * Bump bundled video.js to v3.2.3 (#512)Sebastian Spaeth2012-12-2512-4224/+191
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is nothing inherently wrong with the currently bundled version, but the last one was uploaded in March 2012 and there have been upstream releases since. So bump to the latest available release 3.2.3. Might help with the reported issue 512 of an unresponsive video player. Do note that the Flash fallback option is removed. If we decide this should be added it is easy to add it back. We still use our own customized theme. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
| * makeadmin and changepasswd had swapped help textChristopher Allan Webber2012-12-251-2/+2
| |
| * Try ipython-based shell first, falling back to plain shellSebastian Spaeth2012-12-191-9/+8
| | | | | | | | Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* | (SQL) Media types: Refactor backrefnames.Elrond2012-12-245-5/+20
| | | | | | | | | | | | | | We need to know the name of the backref, so that we can access it by name on the MediaEntry. We might be able to get this name by inspection, but this way is easier, for now.
* | Remove mongo style .id = ObjectId()Elrond2012-12-242-6/+0
| | | | | | | | | | On SQL we can't generate the primary key on our own. So just remove this stuff.
* | Mongo removal: Remove the validate=True arg to obj.save()Elrond2012-12-246-10/+9
| | | | | | | | | | all callers were forced to use validate=True anyway. So remove this useless stuff.
* | Fix some unicode related issues in oauth and the api.Elrond2012-12-232-2/+2
| | | | | | | | Found using the previous commit.
* | Testsuite: Turn SQLAlchemy warnings into errorsElrond2012-12-231-0/+4
| | | | | | | | | | | | | | | | | | | | We should handle SQLAlchemy warnings. And to make that a lot easier, turn them into real errors. That way they 1) Turn up more prominently. 2) Have a useful backtrace. This only happens in the testsuite, so that normal useage is not impacted.
* | Added API testsJoar Wandborg2012-12-233-1/+107
| |
* | Rewrite routing using new MGRoute classElrond2012-12-232-14/+17
| | | | | | | | | | | | | | | | | | | | | | MGRoute subclasses Rule(): Rule doesn't have a way to tag extra data, like the controller function, we need. So MGRoute has a new attribute .gmg_controller, which holds this. Rewrite everything to use this new Rule variant and drop all the other stuff that mapped endpoints to controller functions, mostly.
* | Rewrite routing.py / get_url_mapElrond2012-12-231-14/+12
| | | | | | | | | | | | Move most of the "init routing" code inside get_url_map(). Maybe not the best solution, but better than running the init code directly at module load time.
* | Move things from routing.py to tools/routing.pyElrond2012-12-238-48/+71
| | | | | | | | | | | | | | This stops a cyclic import. Move add_route, mount and endpoint_to_controller into tools/routing.py and change all callers.
* | Refactor routing in app.py.Elrond2012-12-232-17/+33
| | | | | | | | | | | | Move some things out of app.py into functions in routing.py. This makes app.py a bit more readable and allows us to rewrite routing.
* | Compare user by id not object equalitySebastian Spaeth2012-12-231-4/+1
| | | | | | | | | | | | | | | | | | | | Elrond correctly remarked that we should be comparing user by id and not by comparing User objects (as I mistakenly did). He is right, of course! Also removing the 2 stray debug prints that were left over. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* | Improve sqlalchemy filter rulesSebastian Spaeth2012-12-231-19/+22
| | | | | | | | | | | | | | | | | | | | | | | | Thanks to Elrond's review. 1) Use filter_by more consistently rather than mixing filter and filter_by. 2) Add multiple AND conditions in the same filter rule rather than using separate ones. 3) The atom feeds used filter_by(Modelname.attr == ...) which was the wrong pattern, of course. Thanks for repairing my junk Elrond! Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* | Convert return HttpException to raise HttpExceptionSebastian Spaeth2012-12-236-14/+15
| | | | | | | | | | | | controllers (view function) raise HttpException's and do not return them. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* | Provide tools.response.render_http_exception and use thatSebastian Spaeth2012-12-232-15/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After the webob->werkzeug transition, controller functions can raise werkzeug.HttpExceptions. We need to catch these in app.py when calling the controller and handle them, rendering the corresponding error Response() object. For consistency, we also want to allow meddleware functions to raise HttpExceptions (e.g. the csrf meddleware needs to complain about lack of cookies), so wrap the request and response parts of the meddleware too. Finally, the urlmap.match() can also raise HttpExceptions, so we give it the same treatment (render_http_exception). I am not sure, if we do not need to handle the Redirect exception there in any different way though... The new function render_http_exception makes use of the render_error infrastructure to return a nicely templated error page. It also checks if the stock error messages was used in cases where we have localizations (403, 404) and use those. It is now possible to do things like "raise Forbidden(_('You suckr'))" or raise NotFound(_('where is my left show again')) if you want to return customized error messages to the user. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* | Revert accidental checkinSebastian Spaeth2012-12-2212-248/+0
| | | | | | | | | | | | | | | | Commit 8d19cb2445e2aa1f53431da26d866bf9b5e25872 accidentally included my docs/source/build directory. Removing it again. Thanks to Elrond for noticing. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* | We're in 0.3.3.dev territory now.Christopher Allan Webber2012-12-211-1/+1
| |
* | Remove mongolisms from auth.viewsSebastian Spaeth2012-12-211-22/+13
| | | | | | | | Remove find find_one etc and use sqlalchemy syntax
* | Remove Mongoism query.skip()Sebastian Spaeth2012-12-212-5/+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>
* | Remove mongolisms from user_pages.view #451Sebastian Spaeth2012-12-212-54/+46
| |
* | Refactor media_collectSebastian Spaeth2012-12-211-85/+76
| | | | | | | | | | | | | | | | | | | | | | Remove lots of MOngolisms. Refactor this to remove some indentation levels. Don't do: if success: ... if success: .... if success: ...
* | Merge branch '577_denoise_video_transcoding'Sebastian Spaeth2012-12-211-7/+9
|\ \
| * | Only log output and write progress to db if it has changedSebastian Spaeth2012-12-191-7/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | De-noisify the transcoding log and db updates. Previously we would log and save the progress percentage every second, even if it had not changed at all. Save progress:oercentage in the Transcoder and only log/update when the percentage has actually changed. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* | | Don't dbug log every added plugin routeSebastian Spaeth2012-12-211-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | It is killing testsuite output by drowning out all signals. It should be sufficient to state in the pluginmanager that routes have been added, if we need that kind of output. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* | | Don't require webob as dependencySebastian Spaeth2012-12-2115-1/+258
| | | | | | | | | | | | It is pushing up the daisies. Also relnote the change.
* | | Remove webob compatabilitySebastian Spaeth2012-12-211-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the aliases we provided for webob compatability as webob is now gone. Grepped the code base to check for occurences of the old parameters to be safe. Keep request.GET attribute as alias for request.args as it is often used and django is also using that attribute. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* | | plugins/api: webob.Response -> werkzeug.ResponseSebastian Spaeth2012-12-211-6/+4
| | |
* | | plugins/api: use headers.set(), not headers.update()Sebastian Spaeth2012-12-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | The werkzeug.Response().headers do not offer an update() method as the same key can be twice in the header 'dict'. Thus, iterate over the header keys and use header.set(key, value) which replaces an existing header key. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* | | replace webob.Response with werkzeug ResponseSebastian Spaeth2012-12-212-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace webob usage in one more file. Document a TODO that should be clarified, we should probably be using json_response rather than Response() here. Modify the TestMeddleware to not rely on the content_type attribute being present, while werkzeug.wrappers Response() has it the BaseResponse() object which is often returned in tests does not have it. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* | | Transition webob BadRequest|HTTPFound to webob/redirectSebastian Spaeth2012-12-211-5/+4
| | | | | | | | | | | | | | | More transitioning away from webob Response import from webob was unused
* | | tests/auth: Don't rely on case sensitive error stringsSebastian Spaeth2012-12-211-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | webob's 404 status is "404 NOT FOUND" while werkzeug's is "404 Not Found". Our test suite was checking the upper case string for equality. Just test the status error code "404" rather than the full string which might change at some points/versions and should not need to be tested. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* | | webob.HTTPFound --> MG.tools.redirectSebastian Spaeth2012-12-213-13/+8
| | | | | | | | | | | | | | | | | | Transition away from webob. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* | | Transition webob.HttpForbidden to webob's exceptions ForbiddenSebastian Spaeth2012-12-214-14/+19
| | | | | | | | | | | | Also the BadRequest exception.
* | | Remove webobisms from decorators.pySebastian Spaeth2012-12-211-10/+6
| | | | | | | | | | | | | | | Use our own redirect function rather than webobs HttpFound Also replace HttpForbidden() with webob's Forbidden()
* | | purge webob from docs and replace with werkzeugSebastian Spaeth2012-12-211-1/+1
| | |
* | | Remove webob from render_to_responseSebastian Spaeth2012-12-212-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We were still using webob's Response objects for template rendering. Transition to werkzeug's Response object. One caveat was that it seemed to have used the default mimetype "text/plain" for all pages, so we override the default Response class, setting the default mime type to "text/html". Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* | | Extend redirect helper to take optional location keywordSebastian Spaeth2012-12-211-10/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to move away from webob with its redirect(location=...) we need to provide a redirect function that allows to directly specify the URL rather than the urlgen parameters that we now use. Extend our MG.tools:redirect helper so we can pass in the direct URL via the optional "location" keyword. This commit does not switch over any redirect consumers yet. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* | | Remove SimpleFieldAliasSebastian Spaeth2012-12-211-12/+0
| | | | | | | | | | | | | | | | | | | | | It was only used for the model._id -> model.id conversion and is not needed anymore. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* | | Move DBModel._id -> DBModel.idSebastian Spaeth2012-12-2130-119/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Fix up testsSebastian Spaeth2012-12-213-11/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | empty find() queries would not work anymore with the simplified .find compatability code, so remove these and use proper sqlalchemy in the tests. The storage test failed because my virtualenv environment ran mediagoblin/local/mediagoblin/tests/test_storage.py and somehow decided the 2 classes are different objects. Just test against the full class name. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* | | Fixing tyop'ed "dbupdate"Christopher Allan Webber2012-12-201-1/+1
| | |
* | | NOW RELEASING: MediaGoblin 0.3.2! :DChristopher Allan Webber2012-12-201-1/+1
| | |
* | | Committing extracted and compiled translationsChristopher Allan Webber2012-12-202-1/+1
| | |
* | | Committing present MediaGoblin translations before pushing extracted messagesChristopher Allan Webber2012-12-201-23/+23
| | |
* | | 0.3.2 release notesChristopher Allan Webber2012-12-201-1/+58
| | |
* | | Updating AUTHORS with new contributors. Nice job new contributors! :)Christopher Allan Webber2012-12-201-0/+4
| | |
* | | Committing extracted and compiled translationsChristopher Allan Webber2012-12-2057-779/+684
| | |