{% extends 'admin/change_form.html' %}
{% load i18n admin_urls static admin_modify regex %}
{% block extrahead %}{{ block.super }}
    {{ form.media }}
<style>
    textarea {
        width: 100%;
        height: 80px;
    }
</style>
{% endblock %}

{% block breadcrumbs %}
    <div class="breadcrumbs">
        <a href="{% url 'admin:index' %}">{% trans 'Home' %}</a>
        &rsaquo; <a href="{% url 'admin:app_list' app_label=opts.app_label %}">{{ opts.app_config.verbose_name }}</a>
        {% if target %}
        &rsaquo; {% if has_change_permission %}
        <a href="{% url opts|admin_urlname:'changelist' %}">{{ opts.verbose_name_plural|capfirst }}</a>{% else %}
        {{ opts.verbose_name_plural|capfirst }}{% endif %}
        &rsaquo; <a href="{% url opts|admin_urlname:'change' object.id %}">{{ target }}</a>
        {% endif %}
        &rsaquo; Test Regular Expression
    </div>
{% endblock breadcrumbs %}
{% block content %}
    <hr/>
    <form method="post">
        {% csrf_token %}
        <table>
            {{ form }}
        </table>
        <input type="submit" name='test' value="Test">
        <input type="submit" name='save' value="Save">
    </form>
    {% if match %}
        {{ match }}
        {% inspect match as aaa %}
        <ul>
            {% for g in aaa.groups %}
                <li>{{ g }}</li>
            {% endfor %}
        </ul>
        <ul>
            {% for g in span %}
                <li>{{ g }}</li>
            {% endfor %}
        </ul>
        <ul>
            {% for a,b in groupdict.items %}
                <li>{{ a }}:{{ b }}</li>
            {% endfor %}
        </ul>
    {% endif %}
{% endblock content %}
