{% extends "base.html" %}
{% load cropping thumbnail %}
{% block extra_head %}
  {{ form.media }}
{% endblock %}
{% block content %}
  <form method="post" id="cropping_form" action="." enctype="multipart/form-data">{% csrf_token %}
    {{ form.as_p }}
    <input type="submit" value="Save"/>
  </form>
  {% if image %}
    <br />
    <h4>Preview</h4>
      <h5>using cropped_thumbnail tag</h5>
      <img src="{% cropped_thumbnail image cropping %}" />
      <h5>using standard thumbnail tag with a cropping field value (string) as box argument</h5>
      <img src="{% thumbnail image.image_field 120x100 box=image.cropping crop detail %}">
      <h5>using standard thumbnail tag with a list of integers as box argument</h5>
      <img src="{% thumbnail image.image_field 120x100 box=image.get_cropping_as_list crop detail %}">
  {% endif %}
{% endblock %}

