forked from AFPy/afpy.org
Display image in edit post form
This commit is contained in:
parent
a86c967ae7
commit
979eb8d972
|
@ -118,7 +118,7 @@ def save_post(category, timestamp, admin, form, files):
|
|||
filename = secure_filename(post_image.filename)
|
||||
post_image.save(str(post.parent / filename))
|
||||
element = ElementTree.SubElement(tree, 'image')
|
||||
element.text = str(post.parent / filename)
|
||||
element.text = filename
|
||||
|
||||
element = ElementTree.SubElement(tree, STATE_PUBLISHED)
|
||||
element.text = email.utils.formatdate(
|
||||
|
|
|
@ -30,7 +30,8 @@
|
|||
<label>Description
|
||||
<textarea name="summary">{{ post.summary }}</textarea>
|
||||
</label>
|
||||
<label>
|
||||
<label>Image
|
||||
<img alt="" src="{{ url_for('post_image', path=post._image) }}" />
|
||||
<input name="image" id="image" type="file" value="{{ post.image }}" />
|
||||
</label>
|
||||
<label>Contenu de l'article
|
||||
|
|
Loading…
Reference in New Issue
Block a user