From: Elrond Date: Sun, 4 Dec 2011 19:06:42 +0000 (+0100) Subject: Dot-Notation for MediaEntry.description(_html) X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=1d9399660416fe5a04d322303986434815bc15f0;p=mediagoblin.git Dot-Notation for MediaEntry.description(_html) --- diff --git a/mediagoblin/edit/views.py b/mediagoblin/edit/views.py index 51661a21..4cb98c15 100644 --- a/mediagoblin/edit/views.py +++ b/mediagoblin/edit/views.py @@ -45,7 +45,7 @@ def edit_media(request, media): defaults = dict( title=media.title, slug=media.slug, - description=media['description'], + description=media.description, tags=media_tags_as_string(media['tags'])) form = forms.EditForm( @@ -65,12 +65,12 @@ def edit_media(request, media): _(u'An entry with that slug already exists for this user.')) else: media.title = unicode(request.POST['title']) - media['description'] = unicode(request.POST.get('description')) + media.description = unicode(request.POST.get('description')) media['tags'] = convert_to_tag_list_of_dicts( request.POST.get('tags')) - media['description_html'] = cleaned_markdown_conversion( - media['description']) + media.description_html = cleaned_markdown_conversion( + media.description) media.slug = unicode(request.POST['slug']) media.save() diff --git a/mediagoblin/submit/views.py b/mediagoblin/submit/views.py index 1805e293..8da71341 100644 --- a/mediagoblin/submit/views.py +++ b/mediagoblin/submit/views.py @@ -60,9 +60,9 @@ def submit_start(request): unicode(request.POST['title']) or unicode(splitext(filename)[0])) - entry['description'] = unicode(request.POST.get('description')) - entry['description_html'] = cleaned_markdown_conversion( - entry['description']) + entry.description = unicode(request.POST.get('description')) + entry.description_html = cleaned_markdown_conversion( + entry.description) entry.uploader = request.user._id