Show id of photos for including in markdown
This commit is contained in:
parent
d2d122fc98
commit
149a5d4b24
@ -10,7 +10,7 @@ class PageForm(FlaskForm):
|
||||
title = StringField('Title', validators=[DataRequired()])
|
||||
description = TextAreaField('Beskrivning')
|
||||
endpoint = BooleanField('Produkt')
|
||||
thumbnail = QuerySelectField('Bild', get_label='alt')
|
||||
thumbnail = QuerySelectField('Bild', get_label=lambda p: '{} ({})'.format(p.alt, p.id))
|
||||
photos = QuerySelectMultipleField('Galleri',
|
||||
option_widget=widgets.CheckboxInput(),
|
||||
widget=widgets.ListWidget(prefix_label=False),
|
||||
|
@ -125,6 +125,7 @@
|
||||
{% for photo in photos %}
|
||||
<div class="col-md-2">
|
||||
<div class="thumbnail">
|
||||
{{photo.id}}
|
||||
<img src="{{ photo.thumbnail }}" class="img-responsive">
|
||||
<div class="panel-footer">
|
||||
<a href="{{url_for('admin_photo', id=photo.id)}}" class="btn btn-default"><span class="glyphicon glyphicon-pencil"></a>
|
||||
|
Loading…
x
Reference in New Issue
Block a user