#i536: Removing attachments stuff from edit_media(), in its own method now
This commit is contained in:
parent
5a17728bd5
commit
7084661d5b
@ -46,9 +46,6 @@ def edit_media(request, media):
|
|||||||
description=media['description'],
|
description=media['description'],
|
||||||
tags=media_tags_as_string(media['tags']))
|
tags=media_tags_as_string(media['tags']))
|
||||||
|
|
||||||
if len(media['attachment_files']):
|
|
||||||
defaults['attachment_name'] = media['attachment_files'][0]['name']
|
|
||||||
|
|
||||||
form = forms.EditForm(
|
form = forms.EditForm(
|
||||||
request.POST,
|
request.POST,
|
||||||
**defaults)
|
**defaults)
|
||||||
@ -73,14 +70,6 @@ def edit_media(request, media):
|
|||||||
media['description_html'] = cleaned_markdown_conversion(
|
media['description_html'] = cleaned_markdown_conversion(
|
||||||
media['description'])
|
media['description'])
|
||||||
|
|
||||||
if 'attachment_name' in request.POST:
|
|
||||||
media['attachment_files'][0]['name'] = \
|
|
||||||
request.POST['attachment_name']
|
|
||||||
|
|
||||||
if 'attachment_delete' in request.POST \
|
|
||||||
and 'y' == request.POST['attachment_delete']:
|
|
||||||
del media['attachment_files'][0]
|
|
||||||
|
|
||||||
media['slug'] = unicode(request.POST['slug'])
|
media['slug'] = unicode(request.POST['slug'])
|
||||||
media.save()
|
media.save()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user