# 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)
# 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]))
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,