diff options
author | Elrond <elrond+mediagoblin.org@samba-tng.org> | 2012-12-26 23:40:42 +0100 |
---|---|---|
committer | Elrond <elrond+mediagoblin.org@samba-tng.org> | 2012-12-26 23:42:26 +0100 |
commit | b228d89715558281d9573543dd0d6c74836d42ca (patch) | |
tree | 858aeb502482ac2cda3b41acc176b21e9a606250 /mediagoblin/submit/views.py | |
parent | 01986008f66a1899d415a186c688f3056f6d8e6b (diff) | |
download | mediagoblin-b228d89715558281d9573543dd0d6c74836d42ca.tar.lz mediagoblin-b228d89715558281d9573543dd0d6c74836d42ca.tar.xz mediagoblin-b228d89715558281d9573543dd0d6c74836d42ca.zip |
prepare_queue_task: Take app not request.
First rename prepare_entry to prepare_queue_task, because
this is really more like what this thing does.
Thanks to Velmont for noting that we do not need a request
in here, but an "app" is good enough. Which means, that
this stuff can be called from tool scripts too.
Diffstat (limited to 'mediagoblin/submit/views.py')
-rw-r--r-- | mediagoblin/submit/views.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mediagoblin/submit/views.py b/mediagoblin/submit/views.py index d36f5f5d..2d609b31 100644 --- a/mediagoblin/submit/views.py +++ b/mediagoblin/submit/views.py @@ -33,7 +33,7 @@ from mediagoblin.messages import add_message, SUCCESS from mediagoblin.media_types import sniff_media, \ InvalidFileType, FileTypeNotSupported from mediagoblin.submit.lib import handle_push_urls, run_process_media, \ - prepare_entry + prepare_queue_task @require_active_login @@ -78,7 +78,7 @@ def submit_start(request): # Generate a slug from the title entry.generate_slug() - queue_file = prepare_entry(request, entry, filename) + queue_file = prepare_queue_task(request.app, entry, filename) with queue_file: queue_file.write(request.files['file'].stream.read()) |