aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorElrond <elrond+mediagoblin.org@samba-tng.org>2011-12-04 20:16:01 +0100
committerElrond <elrond+mediagoblin.org@samba-tng.org>2011-12-05 21:08:58 +0100
commitf4ee839939e4215820df3132b62c51f721510f77 (patch)
treef2d27755109fce36028ada5cd5a0ed626ad930d6
parent1d9399660416fe5a04d322303986434815bc15f0 (diff)
downloadmediagoblin-f4ee839939e4215820df3132b62c51f721510f77.tar.lz
mediagoblin-f4ee839939e4215820df3132b62c51f721510f77.tar.xz
mediagoblin-f4ee839939e4215820df3132b62c51f721510f77.zip
Dot-Notation for MediaEntry.media_type
-rw-r--r--mediagoblin/processing.py4
-rw-r--r--mediagoblin/submit/views.py2
-rw-r--r--mediagoblin/user_pages/views.py2
3 files changed, 4 insertions, 4 deletions
diff --git a/mediagoblin/processing.py b/mediagoblin/processing.py
index 89c4ac89..7dd5cc7d 100644
--- a/mediagoblin/processing.py
+++ b/mediagoblin/processing.py
@@ -55,8 +55,8 @@ class ProcessMedia(Task):
# Try to process, and handle expected errors.
try:
- #__import__(entry['media_type'])
- manager = get_media_manager(entry['media_type'])
+ #__import__(entry.media_type)
+ manager = get_media_manager(entry.media_type)
manager['processor'](entry)
except BaseProcessingFail, exc:
mark_entry_failed(entry._id, exc)
diff --git a/mediagoblin/submit/views.py b/mediagoblin/submit/views.py
index 8da71341..4e4c7c43 100644
--- a/mediagoblin/submit/views.py
+++ b/mediagoblin/submit/views.py
@@ -55,7 +55,7 @@ def submit_start(request):
# create entry and save in database
entry = request.db.MediaEntry()
entry['_id'] = ObjectId()
- entry['media_type'] = unicode(media_type)
+ entry.media_type = unicode(media_type)
entry.title = (
unicode(request.POST['title'])
or unicode(splitext(filename)[0]))
diff --git a/mediagoblin/user_pages/views.py b/mediagoblin/user_pages/views.py
index dc549567..87b82c74 100644
--- a/mediagoblin/user_pages/views.py
+++ b/mediagoblin/user_pages/views.py
@@ -122,7 +122,7 @@ def media_home(request, media, page, **kwargs):
comment_form = user_forms.MediaCommentForm(request.POST)
- media_template_name = get_media_manager(media['media_type'])['display_template']
+ media_template_name = get_media_manager(media.media_type)['display_template']
return render_to_response(
request,