aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* Docs fix: Adding proper blank line after the "Run::"Christopher Allan Webber2012-12-201-0/+4
|
* Added documentation on how to add STL support, and notes on running ↵Christopher Allan Webber2012-12-201-2/+34
| | | | ./bin/gmg dbupdate
* Try ipython-based shell first, falling back to plain shellSebastian Spaeth2012-12-191-9/+8
| | | | Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* makeadmin and changepasswd had swapped help textChristopher Allan Webber2012-12-181-2/+2
|
* Remove collection_thumbnail styling, so collection thumbnails are styled the ↵Jef van Schendel2012-12-162-31/+6
| | | | same as other thumbnails
* Release note 0.3.2 blurbSebastian Spaeth2012-12-151-6/+18
| | | | On MongoDB...
* Adding info to the docs about running dbupdateChristopher Allan Webber2012-12-142-0/+15
| | | | | | Both adding info to run it when adding new media types, and adding info that you might need to stop mediagoblin before you run these commands.
* Switching both gettext calls to _() so babel can find/extract them.Christopher Allan Webber2012-12-141-4/+6
| | | | Babel looks for _() and gettext() so this is necessary.
* Add comments explaining how translitcodec *is* usedChristopher Allan Webber2012-12-141-0/+2
|
* Add example to the lazy gettext version to make clear when it's appropriateSebastian Spaeth2012-12-141-1/+4
| | | | I needed an example to really get when lazy_gettext would be good...
* Use the correct translation mechanismSebastian Spaeth2012-12-141-3/+4
| | | | | | | We accidentally used the fake translation mechanism here which will not actually translate anything. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* Fiy python2.7'ism (#566)Sebastian Spaeth2012-12-141-3/+7
| | | | | | | | | | | | | The oauth plugin used timedelta.total_seconds which was introduced in python 2.7 only. To preserve backwards compatability, we simply calculate the time difference in seconds manually. I considered monkeypatching total_seconds to the timedelta object, but it is a built-in type written in C (I believe) and modifying attributes failed horribly. Switch this to use total_seconds once we require python 2.7 as minimum version. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* Small styling edits to thumbnailsJef van Schendel2012-12-131-2/+4
|
* Make "add media to collection" a normal <img/>Elrond2012-12-132-12/+3
| | | | | | | | | | | | | This button used to be a css style <a href=...> </a> (note: No contents for the <a>). Using this approach has various drawbacks. Most notably: - Not clickable in text mode browsers - Possibly getting marked as a hidden (spam) link - No alt attribute So replaced with a real <img/>. I have no idea what to put in the alt attribute.
* Migrate some fixes from base.html to airy/base.html.Elrond2012-12-131-5/+9
| | | | | When fixing our templates, we should always take a look at the other themes and fix those too.
* Do not translate just a variable expansion.Elrond2012-12-121-3/+1
| | | | | | | | No point in translating <p>{{ var }}</p>. Really. This does not hurt the string freeze, as it removes a translateable string. So any translations of this string are just well ... usefuless afterwards.
* Fix spacing in links to attachment files.Elrond2012-12-122-3/+3
| | | | | | | | We had """<a href="abc.dat"> abc.dat</a>""" (note the apace). And this space is being rendered as a link by browsers. This looks strange, really. So fix the spacing.
* We don't need to save entries during processing... also adding comments ↵Christopher Allan Webber2012-12-123-5/+3
| | | | explaining such
* More unicode fixes in the test suiteSebastian Spaeth2012-12-121-6/+7
| | | | | | | | | | Pass in unicode not (binary) strings where sqlite expects unicode values to prevent the test suite from (correctly) complaining about errors. I now pass the full suite without any complaints. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* Setting the user profile back to 3 columns wide!Christopher Allan Webber2012-12-111-1/+1
| | | | Previously this was set to two when the spacing between thumbs got borkified.
* Make sqlalchemy stop complaining about non-unicode inputSebastian Spaeth2012-12-112-4/+4
| | | | | | | | | | | These tests output noisy sql complaints about receiving non-unicode for an unicode field. This was ... well ... because we were handing in non-unicode usernames and passwords. Prefixing usernames/passwords with u'' makes the testsuite less noisy and verbose. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* Fix CSRF tests with webtest 1.4.0Sebastian Spaeth2012-12-111-3/+3
| | | | | | | | | | CSRF tests apparently passed with earlier versions of webtest, but failed with the latest webtest (1.4.0) package. It choked on passing a "key=value; " cookie as it split at the semicolon and failed to find additional values or something like that. Removing the semicolon makes this test pass. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* Remove print statments from this migration.Christopher Allan Webber2012-12-101-6/+5
| | | | | | | The reason for wanting to give extra information to the user (this is a very special case migration) is good, but we don't have a nice "official" way to capture and present that information during tests, so removing this.
* Fix typo, disable debugging.Elrond2012-12-101-3/+2
|
* UniqueConstraing migration: Adding the explaining comments.Elrond2012-12-101-0/+23
| | | | Add a lengthy comment explaining all the variants.
* Fixing our broken CollectionItem unique constraint.Elrond2012-12-101-4/+42
| | | | | This one seems to work nicely in all relevant situations. See comments inside the source.
* Ensure query_dict is a dict after the contents have been modified.Nathan Yergler2012-12-101-2/+8
| | | | | | _fix_query_dict modifies its argument in place. Ensure that the argument passed in has a local name and will be passed into the subsequent filter_by call.
* Eeek! Set the migration number to the current migration number being run!Christopher Allan Webber2012-12-091-1/+1
|
* Elrond's suggestion: have set_current_migration execute after each migration ↵Christopher Allan Webber2012-12-091-1/+1
| | | | run.
* Committing extracted and compiled translationsChristopher Allan Webber2012-12-0754-1215/+2445
|
* Committing present MediaGoblin translations before pushing extracted messagesChristopher Allan Webber2012-12-073-73/+74
|
* Add a UniqueConstraint add test in test_sql_migrationsChristopher Allan Webber2012-12-051-3/+26
| | | | | We should have this anyway, and Elrond needs it to help fix current broken migration thingies.
* Fix user collection gallerySebastian Spaeth2012-12-051-13/+9
| | | | | | | | | | | We were fetching the user collection gallery by slug only, so if two users had the same collection slug, we would not have been sure which one we'd get. Fix this by explicitly only fetching the specific user's collections. Also switch over the view function to make use of the new active_user_from_url decorator that fetches the User() object for us. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* Switch over the user gallery to the active_user_from_url decoratorSebastian Spaeth2012-12-051-13/+10
| | | | | | | | This switches the user gallery page over to use the new decorator, and cleans up the queries to be in proper sqlalchemy format rather than the old mongo format. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* Create a active_user_from_url decoratorSebastian Spaeth2012-12-051-0/+15
| | | | | | | | | This can be used for URL patterns containing a <user> element. It will look up the corresponding user among all active users and return a 404 NOT FOUND page if there is no such active user. It then passes the User() instance as url_user keyword argument to the decorated view function. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* Remove gridify_*Sebastian Spaeth2012-12-043-33/+2
| | | | | | | | | | | | | We injected a gridify_list and gridify_cursor function into each jinja2 template that we render. This was used to split the list of media_entries into batches of 5 for nicer table columns. However, jinja2 has a nice |batch filter built in that does the job for us just as well with less code (on our side) Less code=good so let's merge this one. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* We arean't using header_dropdown.js anymore because the dropdown is gone!Christopher Allan Webber2012-12-041-2/+0
|