mediagoblin.git
11 years agodocstring update: link theme... and plugins!
Christopher Allan Webber [Thu, 23 May 2013 15:55:09 +0000 (10:55 -0500)]
docstring update: link theme... and plugins!

11 years agoGeneralize "gmg theme assetlink" -> "gmg assetlink" and cover both theme and plugins
Christopher Allan Webber [Thu, 23 May 2013 14:52:57 +0000 (09:52 -0500)]
Generalize "gmg theme assetlink" -> "gmg assetlink" and cover both theme and plugins

We've moved the module... probably I'll re-add theme just to give a
warning that this is deprecated.

This commit sponsored by Kevin Williams.  Thank you!

11 years agotest_plugin_staticdirect now works and passes.
Christopher Allan Webber [Wed, 22 May 2013 20:55:21 +0000 (15:55 -0500)]
test_plugin_staticdirect now works and passes.

This commit sponsored by Samuel Vale.  Thank you!

11 years agoSimple "staticstuff" plugin for writing unit tests on plugin static asset linking.
Christopher Allan Webber [Wed, 22 May 2013 19:20:44 +0000 (14:20 -0500)]
Simple "staticstuff" plugin for writing unit tests on plugin static asset linking.

It doesn't do much... it just has a static directory with a "bunnify"
CSS file and has a unit test that returns a json encoded set of a
staticdirect with both this plugin enabled and also
with (theoretically) a file distributed with MediaGoblin (it isn't
really, but in our case that doesn't matter.)

Also set up the static_setup hook / PluginStatic object for this
plugin; testing that with `./bin/gmg theme assetlink` seemed to work.
(And argh, need to update that command name, I know.)

This commit sponsored by Bradley Kuhn.  Thanks bkuhn!

11 years agoVarious fixes to plugin assetlinking command.
Christopher Allan Webber [Wed, 22 May 2013 19:07:41 +0000 (14:07 -0500)]
Various fixes to plugin assetlinking command.

Actually trying to run the command helps figure out what needs to be
fixed :)

This commit sponsored by Justin Nichol.  Thank you!

11 years agoMoving test_user_dev->user_dev in plugin app configs & adding plugin static serving
Christopher Allan Webber [Wed, 22 May 2013 17:23:06 +0000 (12:23 -0500)]
Moving test_user_dev->user_dev in plugin app configs & adding plugin static serving

The test_user_dev (as opposed to user_dev) was a legacy before we had
each application running in its own directory (as they now do in
pytest).  Move that name to just user_dev... this is more consistent
with the rest of our naming and will make writing these config files
easier.  (If we want to test that changing these still works, that
should be a separate unit test with special config files.)

Additionally, add plugin static serving to the common test paste
config file.

This commit sponsored by Juan Jose Marin Martinez.  Thank you!

11 years agoDocument assetlink and staticdirect usage for plugins.
Christopher Allan Webber [Wed, 22 May 2013 16:51:46 +0000 (11:51 -0500)]
Document assetlink and staticdirect usage for plugins.

Still a bit to clean up around what the command to be run actually is,
since that will likely change.

This commit sponsored by David Decker.  Thank you!

11 years agoOh right, actually mount /plugin_static/ :)
Christopher Allan Webber [Wed, 22 May 2013 15:06:24 +0000 (10:06 -0500)]
Oh right, actually mount /plugin_static/ :)

11 years agoWork towards getting plugin static linking/serving to work
Christopher Allan Webber [Tue, 21 May 2013 21:07:18 +0000 (16:07 -0500)]
Work towards getting plugin static linking/serving to work

 - add link_plugin_assets.  For now, incorrectly running from
   ./bin/gmg theme assetlink... uh, will fix ;)
 - Update paste and config_spec.ini configs to handle the locations
   and serving of the plugins' static resources

This commit sponsored by Marko Dimjašević.  Thank you!

11 years agoStart of ability to have plugins provide static resources!
Christopher Allan Webber [Thu, 16 May 2013 15:38:45 +0000 (10:38 -0500)]
Start of ability to have plugins provide static resources!

Note I have not tested any of this yet ;)  But we're already on our way:
 - We've got docs
 - The hook is there

Lots to do still though.  But, progress! :)

This commit sponsored by Laura Arjona Reina.  Thanks larjona!

11 years agoMove "bits" templates with dashes in them to underscores
Christopher Allan Webber [Wed, 22 May 2013 21:44:50 +0000 (16:44 -0500)]
Move "bits" templates with dashes in them to underscores

Moved all references and also added a note to our release notes.

This commit sponsored by Juan Rodriguez.  Thank you!

11 years agoMoved frontpage "welcome" stuff into its own bits file.
Christopher Allan Webber [Wed, 22 May 2013 21:31:39 +0000 (16:31 -0500)]
Moved frontpage "welcome" stuff into its own bits file.

This should make it easier to override just that part of the page.

This commit sponsored by David Rylander.  Thank you!

11 years agoPiwigo minor fix in categories_getList.
Mats Sjöberg [Tue, 21 May 2013 19:55:55 +0000 (22:55 +0300)]
Piwigo minor fix in categories_getList.

11 years agoPiwigo: some sanity checks before adding to collection as per Elrond's suggestions.
Mats Sjöberg [Tue, 21 May 2013 19:46:57 +0000 (22:46 +0300)]
Piwigo: some sanity checks before adding to collection as per Elrond's suggestions.

11 years agoPiwigo: return collections list only to logged in users.
Mats Sjöberg [Tue, 21 May 2013 19:42:41 +0000 (22:42 +0300)]
Piwigo: return collections list only to logged in users.

11 years agoRudimentary collections support for piwigo plugin.
Mats Sjöberg [Tue, 21 May 2013 19:40:02 +0000 (22:40 +0300)]
Rudimentary collections support for piwigo plugin.

11 years agoFixed minor typo in piwigo logging.
Mats Sjöberg [Tue, 21 May 2013 19:39:37 +0000 (22:39 +0300)]
Fixed minor typo in piwigo logging.

11 years agoMerge remote-tracking branch 'rodney757/change_pass'
Elrond [Tue, 21 May 2013 16:34:23 +0000 (18:34 +0200)]
Merge remote-tracking branch 'rodney757/change_pass'

* rodney757/change_pass:
  fixed translation, and changed tabs to spaces, and change it so the user can view their password as they're typing.
  modified change_pass tests
  moved change pass to a seperate view and fixed issues 709

11 years agofixed translation, and changed tabs to spaces, and change it so the user can view...
Rodney Ewing [Tue, 21 May 2013 15:51:21 +0000 (08:51 -0700)]
fixed translation, and changed tabs to spaces, and change it so the user can view their password as they're typing.

11 years agoRefactor submit util new_upload_entry
Elrond [Mon, 20 May 2013 22:28:37 +0000 (00:28 +0200)]
Refactor submit util new_upload_entry

This tool creates an initial media entry for a given user.
No magic. It just prefills the license with the user's
default license and adds the user as uploader.

11 years agomodified change_pass tests
Rodney Ewing [Mon, 20 May 2013 21:27:43 +0000 (14:27 -0700)]
modified change_pass tests

11 years agomoved change pass to a seperate view and fixed issues 709
Rodney Ewing [Mon, 20 May 2013 21:04:02 +0000 (14:04 -0700)]
moved change pass to a seperate view and fixed issues 709

11 years agopiwigo: Return proper error for wrong user/password.
Elrond [Mon, 20 May 2013 15:50:04 +0000 (17:50 +0200)]
piwigo: Return proper error for wrong user/password.

And fix tests.

11 years agopiwigo: Add PwgError class.
Elrond [Mon, 20 May 2013 17:28:35 +0000 (19:28 +0200)]
piwigo: Add PwgError class.

This allows to return piwigo xml errors.
Those can also be matched into html error codes.

11 years agoA bit of pep8 and small typo fix.
Elrond [Sat, 18 May 2013 23:14:46 +0000 (01:14 +0200)]
A bit of pep8 and small typo fix.

11 years agoOnly calculate aperture if fnumber is provided
Joar Wandborg [Sun, 19 May 2013 22:46:29 +0000 (00:46 +0200)]
Only calculate aperture if fnumber is provided

11 years agoTake into account incomplete EXIF data
Joar Wandborg [Sun, 19 May 2013 22:25:19 +0000 (00:25 +0200)]
Take into account incomplete EXIF data

11 years agoFixed EXIF tests
Joar Wandborg [Sun, 19 May 2013 22:11:00 +0000 (00:11 +0200)]
Fixed EXIF tests

11 years agoModifies EXIF section with Camera Info, display toggle and template styling
Gabriel Saldana [Tue, 5 Mar 2013 06:05:35 +0000 (00:05 -0600)]
Modifies EXIF section with Camera Info, display toggle and template styling

11 years agoChanges to display all EXIF information
Gabriel Saldana [Tue, 5 Mar 2013 05:19:22 +0000 (23:19 -0600)]
Changes to display all EXIF information

11 years agoAdded upload processing to the piwigo/addSimple
Joar Wandborg [Sun, 19 May 2013 20:54:39 +0000 (22:54 +0200)]
Added upload processing to the piwigo/addSimple

11 years agoJust word-wrapping the recent changes to the deployment docs.
Christopher Allan Webber [Fri, 17 May 2013 20:10:34 +0000 (15:10 -0500)]
Just word-wrapping the recent changes to the deployment docs.

11 years agoMerge remote-tracking branch 'refs/remotes/merge-requests/58'
Christopher Allan Webber [Fri, 17 May 2013 20:08:53 +0000 (15:08 -0500)]
Merge remote-tracking branch 'refs/remotes/merge-requests/58'

11 years agoNoting why we don't have an email uniqueness constraint in the db.
Christopher Allan Webber [Fri, 17 May 2013 19:10:29 +0000 (14:10 -0500)]
Noting why we don't have an email uniqueness constraint in the db.

This commit sponsored by Guido Günther.  Thanks!

11 years agoMerge remote-tracking branch 'refs/remotes/elrond/misc/pytest_enable_testing'
Christopher Allan Webber [Fri, 17 May 2013 16:13:17 +0000 (11:13 -0500)]
Merge remote-tracking branch 'refs/remotes/elrond/misc/pytest_enable_testing'

11 years agoReverting "Always activate testing in every test module ever."
Christopher Allan Webber [Fri, 17 May 2013 16:12:56 +0000 (11:12 -0500)]
Reverting "Always activate testing in every test module ever."
Revert "Always activate testing in every test module ever."

This reverts commit 0536306048daa0970d2e43411ba2a9bf073e570e.

11 years agoAlways activate testing using pytest fixture.
Elrond [Thu, 16 May 2013 23:46:20 +0000 (01:46 +0200)]
Always activate testing using pytest fixture.

This is possibly the cleaner approach to the problem solved
in the previous commit.

The previous commit makes sure, that testing is enabled at
import time. While this one enables it just before the
individual test is run. So this one takes a bit more CPU.

Maybe revert the previous commit?

References: 0536306048daa0970d2e43411ba2a9bf073e570e

11 years agoAlways activate testing in every test module ever.
Christopher Allan Webber [Thu, 16 May 2013 22:51:21 +0000 (17:51 -0500)]
Always activate testing in every test module ever.

Kind of a dorky way to implement this, but...

11 years agoFixing bug in dbupdate where it would explode on plugin that is missing MODELS or...
Christopher Allan Webber [Thu, 16 May 2013 21:56:20 +0000 (16:56 -0500)]
Fixing bug in dbupdate where it would explode on plugin that is missing MODELS or MIGRATIONS

The reason it blew up was because in the latter caught exception, it
wouldn't set models/migrations to an empty set, so it would actually
use the previous run's models/migrations!  That's what we get for
"leaky" variables on python for loops :)

This commit sponsored by Pascal Diogo Antunes.  Thank you!

11 years agoMerge branch '623_context_hooks'
Christopher Allan Webber [Wed, 15 May 2013 16:40:51 +0000 (11:40 -0500)]
Merge branch '623_context_hooks'

11 years agoTesting the template_context_prerender hook
Christopher Allan Webber [Wed, 15 May 2013 16:40:28 +0000 (11:40 -0500)]
Testing the template_context_prerender hook

This allows for modifying any context *right before render*, including
access to the variables that are passed in.  This test takes advantage
of that and takes one of the variables, "doubleme", and modifies
it (doubles it!)

In our case it turns "happy" and "joy" into "happyhappy" and "joyjoy".

This commit sponsored by Mark Holmquist.  Thank you!

11 years agoSimple tyop, view->test... I was writing too many tests at the time :)
Christopher Allan Webber [Wed, 15 May 2013 16:29:43 +0000 (11:29 -0500)]
Simple tyop, view->test... I was writing too many tests at the time :)

11 years agoOh right, actually add that hook we just documented, "template_context_prerender" :)
Christopher Allan Webber [Wed, 15 May 2013 16:11:24 +0000 (11:11 -0500)]
Oh right, actually add that hook we just documented, "template_context_prerender" :)

This commit sponsored by William Goudie.  Thanks Bill! :)

11 years agoHook->hooks since there's more than one of them :)
Christopher Allan Webber [Wed, 15 May 2013 16:10:25 +0000 (11:10 -0500)]
Hook->hooks since there's more than one of them :)

11 years agoAdding global context hooks & fixing method names->symbolic view names in docs
Christopher Allan Webber [Wed, 15 May 2013 15:37:41 +0000 (10:37 -0500)]
Adding global context hooks & fixing method names->symbolic view names in docs

This commit sponsored by Sheila Miguez.  Thanks Sheila!

11 years agoAdded documentation on view specific hooks
Christopher Allan Webber [Tue, 14 May 2013 21:09:55 +0000 (16:09 -0500)]
Added documentation on view specific hooks

This commit sponsored by Matthew Woodward.  Thank you!

11 years agoNormalizing indentation a bit in media.html
Christopher Allan Webber [Tue, 14 May 2013 19:57:37 +0000 (14:57 -0500)]
Normalizing indentation a bit in media.html

This commit sponsored by Christian Frank.  Thank you!

11 years agofix for bug when comments are disabled, link attribute is never closed
Rodney Ewing [Tue, 14 May 2013 19:36:13 +0000 (12:36 -0700)]
fix for bug when comments are disabled, link attribute is never closed

11 years agoDocumenting the test_modify_context and context_modified_app methods
Christopher Allan Webber [Tue, 14 May 2013 19:29:23 +0000 (14:29 -0500)]
Documenting the test_modify_context and context_modified_app methods

11 years agoFully working context hooks, both template/view and global level, with tests
Christopher Allan Webber [Tue, 14 May 2013 19:24:27 +0000 (14:24 -0500)]
Fully working context hooks, both template/view and global level, with tests

Needs documentation though... that's coming next :)

This commit sponsored by Luca Tius.  Thanks Luca!

11 years agopiwigo: Start first tests.
Elrond [Thu, 9 May 2013 11:07:10 +0000 (13:07 +0200)]
piwigo: Start first tests.

This first test checks the session logic of the piwigo
plugin. login, logout, getStatus.

11 years agopiwigo: Fix validator usage.
Elrond [Thu, 9 May 2013 10:28:54 +0000 (12:28 +0200)]
piwigo: Fix validator usage.

wtforms.validators.Optional doesn't take an argument.
I don't know, why I gave it one.

11 years agoMerge branch 'master' into 623_context_hooks
Christopher Allan Webber [Sun, 12 May 2013 21:17:35 +0000 (16:17 -0500)]
Merge branch 'master' into 623_context_hooks

11 years agoRemoving reference to nose (thanks for catching, Elrond!)
Christopher Allan Webber [Sun, 12 May 2013 21:07:28 +0000 (16:07 -0500)]
Removing reference to nose (thanks for catching, Elrond!)

This commit sponsored by Kevin McCarthy.  Thank you!

11 years agoTests should no longer use the environment-variable-related-setup and set up in app...
Christopher Allan Webber [Sun, 12 May 2013 20:55:59 +0000 (15:55 -0500)]
Tests should no longer use the environment-variable-related-setup and set up in app instead

This should remove a bunch of confusing cruft.  I hate using that
environment variable!  Also that old code was fragile.

This commit sponsored by Stephen Milton.  Thanks!

11 years agoMaking the uncomment-able db string match the one that we use in the install docs
Christopher Allan Webber [Sun, 12 May 2013 16:45:31 +0000 (11:45 -0500)]
Making the uncomment-able db string match the one that we use in the install docs

This commit sponsored by Denise Merkel.  Thanks, Mom!  Happy Mother's Day!

11 years agoMoving the get_original_date method over to the MediaManager.
Christopher Allan Webber [Sat, 11 May 2013 22:02:26 +0000 (17:02 -0500)]
Moving the get_original_date method over to the MediaManager.

This fixes a bug so that it doesn't explode if the media_data doesn't
exist.

This commit sponsored by Ole-Morten Duesund.  Thank you!

11 years agoUpdated "created on" feature to reflect new "hover for real time" tooling
Christopher Allan Webber [Sat, 11 May 2013 18:56:02 +0000 (13:56 -0500)]
Updated "created on" feature to reflect new "hover for real time" tooling

11 years agoMerge remote-tracking branch 'refs/remotes/tryggvib/532-exif-creation-date'
Christopher Allan Webber [Sat, 11 May 2013 18:48:42 +0000 (13:48 -0500)]
Merge remote-tracking branch 'refs/remotes/tryggvib/532-exif-creation-date'

Conflicts:
mediagoblin/config_spec.ini
mediagoblin/templates/mediagoblin/user_pages/media.html

11 years agoMerge remote-tracking branch 'gabithume/146_debug_message'
Christopher Allan Webber [Sat, 11 May 2013 15:19:31 +0000 (10:19 -0500)]
Merge remote-tracking branch 'gabithume/146_debug_message'

11 years agoUse the controller's symbolic/lookup name as part of the key for context hooks
Christopher Allan Webber [Sat, 11 May 2013 01:26:55 +0000 (20:26 -0500)]
Use the controller's symbolic/lookup name as part of the key for context hooks

This commit sponsored by David Collins.  Thank you!

11 years agoMerge branch 'master' into 623_context_hooks
Christopher Allan Webber [Sat, 11 May 2013 01:19:16 +0000 (20:19 -0500)]
Merge branch 'master' into 623_context_hooks

11 years agoMerge remote-tracking branch 'refs/remotes/dthompson/453_disable_comments'
Christopher Allan Webber [Fri, 10 May 2013 21:33:52 +0000 (16:33 -0500)]
Merge remote-tracking branch 'refs/remotes/dthompson/453_disable_comments'

11 years agoMerge branch 'master' of gitorious.org:mediagoblin/mediagoblin
Christopher Allan Webber [Fri, 10 May 2013 16:26:55 +0000 (11:26 -0500)]
Merge branch 'master' of gitorious.org:mediagoblin/mediagoblin

11 years agoMerge remote-tracking branch 'refs/remotes/merge-requests/47'
Christopher Allan Webber [Fri, 10 May 2013 16:23:36 +0000 (11:23 -0500)]
Merge remote-tracking branch 'refs/remotes/merge-requests/47'

11 years agopiwigo: Better logging for login.
Elrond [Sun, 5 May 2013 15:02:00 +0000 (17:02 +0200)]
piwigo: Better logging for login.

11 years agopiwigo: Let getStatus return the current user.
Elrond [Fri, 29 Mar 2013 13:48:08 +0000 (14:48 +0100)]
piwigo: Let getStatus return the current user.

If there is a user logged in, show his name.

11 years agoCreate new session system for piwigo plugin.
Elrond [Fri, 29 Mar 2013 13:49:13 +0000 (14:49 +0100)]
Create new session system for piwigo plugin.

Using the brand new itsdangerous sessions to power the
sessions for piwigo.
The real point is: Clients want to have the session in a
"pwg_id" cookie and don't accept any other cookie name.

11 years agopiwigo: Add .images.add including form handling.
Elrond [Mon, 25 Mar 2013 14:34:21 +0000 (15:34 +0100)]
piwigo: Add .images.add including form handling.

To make things a bit easier, switch to WTForms
for validating the received data.

11 years agopiwigo: Remove possibly_add_cookie.
Elrond [Sun, 5 May 2013 14:45:37 +0000 (16:45 +0200)]
piwigo: Remove possibly_add_cookie.

This one was a fake thing to make clients happy.
Real sessions coming sonn.

11 years agoFix the new config "plugin spec" loading code so it doesn't break on no plugins section
Christopher Allan Webber [Wed, 8 May 2013 20:21:15 +0000 (15:21 -0500)]
Fix the new config "plugin spec" loading code so it doesn't break on no plugins section

11 years agoFixing API setup with new plugin "config spec" world
Christopher Allan Webber [Wed, 8 May 2013 20:20:27 +0000 (15:20 -0500)]
Fixing API setup with new plugin "config spec" world

It shouldn't reference the config until in the setup_plugin() method,
else there's a race condition.

11 years agoAh right, and here's the config we intend to use for these context modified tests :)
Christopher Allan Webber [Wed, 8 May 2013 19:38:13 +0000 (14:38 -0500)]
Ah right, and here's the config we intend to use for these context modified tests :)

This commit sponsored by Xavier Gulliot.  Thanks Xavier!

11 years agoThe beginning of context hooks.
Christopher Allan Webber [Wed, 8 May 2013 19:35:31 +0000 (14:35 -0500)]
The beginning of context hooks.

Not the working solution, but getting there conceptually.  Basically
we'll have a key with the view and the template as a tuple which is
the context hook that anyone can attach to.

However, some changes have still to be made:
 - The unit test doesn't work yet and contains a set_trace ;)
 - We'll probably switch the "view" component from being the callable
   to the "urlgen"'able name per Elrond's suggestion
 - Found a bug in unit tests related to running custom apps for
   different configs... hm.  I need to fix this!

Nonetheless, making progress.

This commit sponsored by... wait a minute... Christopher Webber?!

11 years agoDocumenting plugin configuration
Christopher Allan Webber [Wed, 8 May 2013 15:57:23 +0000 (10:57 -0500)]
Documenting plugin configuration

This commit sponsored by David Krupicz.  Thanks, David!

11 years agoUnit tests for plugins defining their own config_spec.ini!
Christopher Allan Webber [Wed, 8 May 2013 15:54:43 +0000 (10:54 -0500)]
Unit tests for plugins defining their own config_spec.ini!

This commit sponsored by David Ahmed.  Thank you!

11 years agoAllow plugins to install their own config_spec.ini if they like.
Christopher Allan Webber [Wed, 8 May 2013 15:37:38 +0000 (10:37 -0500)]
Allow plugins to install their own config_spec.ini if they like.

This commit sponsored by Timothy Vollmer.  Thanks Tim!

11 years agoAdded info about editing mediagoblin.ini
Sam Tuke [Mon, 6 May 2013 14:19:10 +0000 (16:19 +0200)]
Added info about editing mediagoblin.ini
Added link to Apache deployment instructions

11 years agoRemoved unused imports in httpapiauth
Joar Wandborg [Sun, 5 May 2013 20:24:34 +0000 (22:24 +0200)]
Removed unused imports in httpapiauth

11 years agoUse collection.url_for_self more; Add missing /a.
Elrond [Sun, 5 May 2013 12:29:57 +0000 (14:29 +0200)]
Use collection.url_for_self more; Add missing /a.

Using collection.url_for_self(request.urlgen) instead
of request.urlgen(lengthy) is so much nicer, so using
it around the place.

Also added a few missing </a> in one template.

11 years agoFix typo in new stl MEDIA_MANAGER.
Elrond [Thu, 2 May 2013 21:38:07 +0000 (23:38 +0200)]
Fix typo in new stl MEDIA_MANAGER.

11 years agoFix media manager reference in video.
Elrond [Tue, 30 Apr 2013 21:44:56 +0000 (23:44 +0200)]
Fix media manager reference in video.

An uninstantiated bare media manager doesn't any more
support ["something"]. You need to do .something.
Fixed for .source_type().

11 years agoMake all media types use the new MediaManager classes.
Praveen Kumar [Mon, 29 Apr 2013 00:15:05 +0000 (05:45 +0530)]
Make all media types use the new MediaManager classes.

11 years agoFixing ticket #146 - Make messaging system testable
Gabi Thume [Tue, 30 Apr 2013 03:35:22 +0000 (20:35 -0700)]
Fixing ticket #146 - Make messaging system testable

11 years agoAdd warning about crypt/itsdangeroussecret.bin.
Elrond [Mon, 29 Apr 2013 22:24:45 +0000 (00:24 +0200)]
Add warning about crypt/itsdangeroussecret.bin.

You should not leak that file, really.

11 years agoCreate redir_obj and use it around.
Elrond [Sat, 27 Apr 2013 22:14:50 +0000 (00:14 +0200)]
Create redir_obj and use it around.

This is a shortcut function to redirect to the main page
for an object. Objects currently supported: media entries
and collections.

And go around and replace various places to use this.

11 years agoRewrite resize_image to use proc_state.store_public.
Elrond [Sun, 21 Apr 2013 12:45:40 +0000 (14:45 +0200)]
Rewrite resize_image to use proc_state.store_public.

This hopefully makes the code nicer and easier to change.

11 years agoimage resizing: Refactor some decisions into resize_tool.
Elrond [Sun, 21 Apr 2013 12:45:40 +0000 (14:45 +0200)]
image resizing: Refactor some decisions into resize_tool.

Loading the thumb/medium sizes from the config, saving
things to the db, and loading the image is now all done by
resize_tool. It still calls resize_image for the actual
work.

11 years agoMake uuid look like a uuid.
Elrond [Sat, 27 Apr 2013 15:01:09 +0000 (17:01 +0200)]
Make uuid look like a uuid.

If we really have to create a visible uuid (for a slug in
this case), don't try to hide the fact that it is a uuid.
So format it like a uuid.

11 years agoRemove extra indentation left over from previous commit.
Elrond [Sat, 27 Apr 2013 13:04:56 +0000 (15:04 +0200)]
Remove extra indentation left over from previous commit.

This only removes an unneeded extra indentation, left over
from the previous removal of code around.

Extra commit so it is easy to check that it only changes
indentation.

11 years agoFix translations for collections and drop useless try.
Elrond [Sat, 27 Apr 2013 12:52:08 +0000 (14:52 +0200)]
Fix translations for collections and drop useless try.

Don't do:  _("With some value: %s" % value)
Please do: _("WIth some value: %s") % value

Fixed for collection messages.

Also removed a
  try:
    some_code.
  except Exception as e:
    raise

No point in doing that.

Fixing the indentation of some_code comes in an extra
commit, because changing indentation is annoying enough
alone, so don't mix it with other changes.

11 years agoword-wrapping the public/queue storage explainations in storage.rst
Christopher Allan Webber [Fri, 26 Apr 2013 21:13:05 +0000 (16:13 -0500)]
word-wrapping the public/queue storage explainations in storage.rst

11 years agoMerge remote-tracking branch 'refs/remotes/npigeon/ticket-660'
Christopher Allan Webber [Fri, 26 Apr 2013 21:08:39 +0000 (16:08 -0500)]
Merge remote-tracking branch 'refs/remotes/npigeon/ticket-660'

11 years agoSwitch "sqlite_refcheck" keyword arg to "migrations" which Elrond thinks is cleaner
Christopher Allan Webber [Fri, 26 Apr 2013 20:27:44 +0000 (15:27 -0500)]
Switch "sqlite_refcheck" keyword arg to "migrations" which Elrond thinks is cleaner

Also, if migrations is true, *explicitly* say that foreign key checking is off

11 years agoDon't turn on sqlite refcheck stuff during migrations
Christopher Allan Webber [Fri, 26 Apr 2013 20:09:03 +0000 (15:09 -0500)]
Don't turn on sqlite refcheck stuff during migrations

11 years agoMerge remote-tracking branch 'refs/remotes/rodney757/issue643' into mergetest
Christopher Allan Webber [Fri, 26 Apr 2013 16:12:46 +0000 (11:12 -0500)]
Merge remote-tracking branch 'refs/remotes/rodney757/issue643' into mergetest

11 years agoRemoved an unused import
Rodney Ewing [Fri, 26 Apr 2013 14:32:39 +0000 (07:32 -0700)]
Removed an unused import

11 years agoUnit test for ReallyLazyProxy.
Elrond [Thu, 25 Apr 2013 11:53:19 +0000 (13:53 +0200)]
Unit test for ReallyLazyProxy.

LazyProxy caches its value. So create a unit test for
lazy_pass_to_ugettext to make sure its returned proxy
actually gives a different translation when the locale
is switched.

11 years agoNo lazy_* needed here; Add ReallyLazyProxy.__repr__.
Elrond [Thu, 25 Apr 2013 12:16:17 +0000 (14:16 +0200)]
No lazy_* needed here; Add ReallyLazyProxy.__repr__.

One should use lazy_* only if you have a good reason.

This one found by our unit tests!

For example add_message adds the message to the session,
the session needs to be serialized (with json) and well,
LazyProxy is not serializable.

To aid in debugging, gave our ReallyLazyProxy a __repr__.

11 years agoAdding ReallyLazyProxy, a proxy that does what we expect :)
Christopher Allan Webber [Wed, 24 Apr 2013 21:39:59 +0000 (16:39 -0500)]
Adding ReallyLazyProxy, a proxy that does what we expect :)