aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* make media_manager a property of MediaEntry in mixin.pySebastian Spaeth2012-12-045-30/+37
| | | | | | | | | | | | | | | | | | | | | | | | In all cases where get_media_manager(_media_type_as_string) was called in our code base we ultimately passed in a "MediaEntry().media_type" to get the matching MEDIA_MANAGER. It so makes sense to make this a function of the MediaEntry rather than a global function in mediagoblin.media_types and passing around media_entry.media_type as arguments all the time. It saves a few import statements and arguments. I also made it so the Media_manager property is cached for subsequent calls, although I am not too sure that this is needed (there are other cases for which this would make more sense) Also add a get_media_manager test to the media submission tests. It submits an image and checks that both media.media_type and media.media_manager return the right thing. Not sure if these tests could not be merged with an existing submission test, but it can't hurt to have things explicit. TODO: Right now we iterate through all existing media_managers to find the right one based on the string of its module name. This should be made a simple dict lookup to avoid all the extra work. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* Fallback to "en_US" if browser does not send preferred languagesSebastian Spaeth2012-12-041-16/+13
| | | | | | | | | | | | | E.g. in our test suite we don't send an "accepted languages" header, which caused the language matching to fail. So we need to explicitely fallback to en_US, in case request.accepted_languages is None. This fixes the tests and all cases where user browsers don't send preferred languages. This also fixes issue #562, the AVAILABLE_LOCALES are already case-normalized and we don't need to fudge the preferred language through the lower_upper_locale thing for each and every request. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* Moving thingiview.js into extlib/Christopher Allan Webber2012-12-038-4/+4
|
* Switch stl processing over to using the workbenchChristopher Allan Webber2012-12-031-11/+16
| | | | | Previously this was writing directly to the public store... that won't work with cloudfiles backend, for example :)
* Correcting minor typo in exception string: Empyt->EmptyChristopher Allan Webber2012-12-031-1/+1
|
* Removing unused conversions subdirChristopher Allan Webber2012-12-031-4/+0
|
* Moving blender render files to be accessed via pkg_resourcesChristopher Allan Webber2012-12-033-11/+28
| | | | | | Previously the .blend and .py files had to be in the same directory mediagoblin/celery launched from. This is now fixed so it pulls them out of the package proper.
* Removing render_test.py, which isn't usedChristopher Allan Webber2012-12-031-29/+0
|
* Removed debug info from the sidebar.Aeva Ntsc2012-12-031-9/+4
|
* tweaking the templateAeva Ntsc2012-12-031-1/+6
|
* Fixed the binary stl loader.Aeva Ntsc2012-12-031-26/+5
|
* Disabled thingiview for obj models, since thingiview's support for them ↵Aeva Ntsc2012-12-031-0/+2
| | | | seems to be broken.
* Added a table to store the file extension of a model.Aeva Ntsc2012-12-032-1/+4
|
* Updated the template for viewing stl models.Aeva Ntsc2012-12-031-28/+102
|
* Added preview rendering for a bunch of different shots.Aeva Ntsc2012-12-031-2/+66
|
* Catching ValueError when trying to use ObjModel on binary stl files.Aeva Ntsc2012-12-031-0/+2
|
* Added script for manually testing the blender renderer.Aeva Ntsc2012-12-031-0/+29
|
* Added blender rendererAeva Ntsc2012-12-032-0/+84
|
* made 3d viewer a little cleanerAeva Ntsc2012-12-031-11/+22
|
* disabled auto rotateAeva Ntsc2012-12-031-6/+10
|
* Added the stl/obj mediatype.Aeva Ntsc2012-12-035-0/+348
|
* Added a rudimentary template for the stl/obj viewer.Aeva Ntsc2012-12-031-0/+63
|
* Added the thingiview.js library.Aeva Ntsc2012-12-031-0/+165
|
* Added the thingiview.js library.Aeva Ntsc2012-12-036-0/+1604
|
* Committing extracted and compiled translationsChristopher Allan Webber2012-12-0354-3671/+4187
|
* Committing present MediaGoblin translations before pushing extracted messagesChristopher Allan Webber2012-12-033-0/+3099
|
* Fix translations around.Elrond2012-12-034-11/+19
| | | | | | | This includes: - Mark more strings for translation - Don't mark html-only nonsense for translation - Mark a better part for translation.
* Go back to pre-login URL after loging inSebastian Spaeth2012-12-031-1/+2
| | | | | | | | Simply append the current URL (sans querystring) as a ?next= parameter to the login URL. This will always take us back to the original page where we were pre-login. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* Provide jinja2 urlencode filterSebastian Spaeth2012-12-031-0/+4
| | | | | | | | | | | Astonishingly, the great jinja2 does not provide a builtin urlquote filter, although it is obviously needed. (jina1 had one) This is: https://github.com/mitsuhiko/jinja2/issues/17 Provide an urlencode filter, based on werkzeug's url_quote_plus function. This is dead easy to implement and gives us all the freedom we want. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* Add extlibs to packagingSebastian Spaeth2012-12-031-0/+1
| | | | | | | setup.py bdist fails as it can't find the extlib's. DOH, that is because we don't package them. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* Use pypi-compatible license signatureSebastian Spaeth2012-12-031-1/+1
| | | | | | | | | | It complains about a non-compatible license string. so use the GNU AGPL v3+ string that is listed at http://pypi.python.org/pypi?%3Aaction=list_classifiers With this change, we are able to create a pypi mediagoblin package. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* en_US is always availableSebastian Spaeth2012-12-023-11/+10
| | | | | | | | | | | We were using "en" as fallback only when no preferred language matched. This is obviously bad. Always insert en_US as available locale, so we can match it with the accept_languages. Don't set available_locales as mg_global, per discussion with paroneaya, make it a global var in translate.py Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* Fixing bug where not all conditions returned a language in ↵Christopher Allan Webber2012-12-011-1/+2
| | | | | | get_locale_from_request() Just had to change the indentation level of the last commit.
* Fall back to "en" if we don't find matching translationsSebastian Spaeth2012-12-021-1/+1
| | | | | | | | In case of no matching translations, target_lang was "None" which blew up things. Fall back to "en" in case we don't find a corresponding translation. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* Also package i18n/*.moSebastian Spaeth2012-12-021-0/+1
| | | | | | | .... and I wondered why my production site fails to display German pages... Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* Honor user's browser language (#558)Sebastian Spaeth2012-12-025-12/+33
| | | | | | | | | | | | | Previously we would attempt to satisfy the user's first language preference, immediately falling back to english if that was not possible. Now, we will get the best match of the user's preferred languages. This requires storing the available locales on app startup, so we have mg_globals.available_locales ready to compare them against the list of preferred user languages. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>