{% extends "admin/base.html" %}
{% load staticfiles %}

{% block title %}Django secure-js-login example project{% endblock %}

{% block breadcrumbs %}
<div class="breadcrumbs">
<a href="/">Example project home</a>
{% if title %} &rsaquo; {{ title }}{% endif %}
</div>
{% endblock %}

{% block content %}
    <h1>Django secure-js-login v{{ version }}</h1>
    <h2>Example project test page.</h2>
    <h3>Try out:</h3>
    <noscript><p class="errornote">Please enable JavaScript!</p></noscript>
    <ul>
        <li>
            <a href="{% url 'secure-js-login:login' %}">{% url 'secure-js-login:login' %} - secure JS login</a>
            <p>
            {% if debug %}
                settings.DEBUG is True: You will see <strong>detail error messages</strong> on failed login!
            {% else %}
                settings.DEBUG is False: You will only see a <strong>common error message</strong> on failed login!
            {% endif %}
            </p>
        </li>
        <li><a href="{% url 'honypot-login:login' %}">{% url 'honypot-login:login' %} - honypot login</a></li>
        <li><a href="{% url 'admin:index' %}">{% url 'admin:index' %} - Django Admin</a></li>
    </ul>
    <h3>Hacked views to change settings:</h3>
    <ul>
        <li>
            settings.<strong>DEBUG</strong> is <strong>{% if debug %}on{% else %}off{% endif %}</strong>:
            {% if debug %}
                <a href="{% url 'debug_off' %}">disable DEBUG</a>
            {% else %}
                <a href="{% url 'debug_on' %}">enable DEBUG</a>
            {% endif %}
        </li>
        <li>
            settings.<strong>TOTP_NEEDED</strong> is <strong>{% if totp %}on{% else %}off{% endif %}</strong>:
            {% if totp %}
                <a href="{% url 'totp_off' %}">disable TOTP_NEEDED</a>
            {% else %}
                <a href="{% url 'totp_on' %}">enable TOTP_NEEDED</a>
            {% endif %}
        </li>
    </ul>
    <hr />
    <h2>project links</h2>
    <table>
        <tr>
            <td>Github</td>
            <td>
                <a href="https://github.com/jedie/django-secure-js-login">github.com/jedie/django-secure-js-login</a>
            </td>
        </tr>
        <tr>
            <td>Python Packages</td>
            <td>
                <a href="https://pypi.python.org/pypi/django-secure-js-login/">pypi.python.org/pypi/django-secure-js-login</a>
            </td>
        </tr>
        <tr>
            <td>Travis CI</td>
            <td>
                <a href="https://travis-ci.org/jedie/django-secure-js-login/">travis-ci.org/jedie/django-secure-js-login</a>
            </td>
        </tr>
        <tr>
            <td>Coveralls</td>
            <td>
                <a href="https://coveralls.io/r/jedie/django-secure-js-login/">coveralls.io/r/jedie/django-secure-js-login</a>
            </td>
        </tr>
    </table>
{% endblock content %}
