You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
898 B
20 lines
898 B
{% load thumbnail %}
|
|
<div class='hidden-fileinput' data-width='300' data-height='240' data-form-id='{{ form.prefix }}'>{{ form.image }}</div>
|
|
<div id='{{ form.prefix }}-img' class='add_photo' data-form-id='{{ form.prefix }}' data-size='300x240'>
|
|
{% if form.tmp_tmb.value %}
|
|
<img src="{{ form.tmp_tmb.value }}" title="{{ item.name }}" />
|
|
{% else %}
|
|
{% if form.image.value %}
|
|
{% thumbnail form.image.value "300x240" format="PNG" as img %}
|
|
<img src="{{ img.url }}" width="{{ img.width }}" height="{{ img.height }}" title="{{ item.name }}" style="width: {{ img.width }}px; height: {{ img.height }}px;"/>
|
|
{% endthumbnail %}
|
|
{% endif %}
|
|
{% endif %}
|
|
|
|
{% csrf_token %}
|
|
{{ form.id }}
|
|
<div class='hidden'>
|
|
{{ form.tmp_image }}
|
|
{{ form.tmp_tmb }}
|
|
</div>
|
|
</div>
|
|
|