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.
103 lines
3.6 KiB
103 lines
3.6 KiB
{% load static %}
|
|
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title> {% block title %}My base template {% endblock %}</title>
|
|
|
|
<script src="{% static 'jquery/jquery.min.js' %}"></script>
|
|
<script src="{% static 'bootstrap/js/bootstrap.min.js' %}"></script>
|
|
|
|
|
|
<link rel="stylesheet" href="{% static 'bootstrap/css/bootstrap.min.css' %} ">
|
|
</head>
|
|
{% comment %}
|
|
{% block body %}
|
|
{% if user.is_authenticated %}
|
|
What is {{ user.username }}. You ar loggened in currently.
|
|
But, you can <a href="/logout">logout</a>.<br/><br/>
|
|
{% else %}
|
|
|
|
{% if form.non_field_errors %}
|
|
{{ form.non_field_errors }}
|
|
{% endif %}
|
|
|
|
<div class="gradient" style="padding: 50px 0;">
|
|
|
|
<form method="post" action="" class="form-signin" id="loginform">
|
|
{% csrf_token %}
|
|
<h2 class="form-signin-heading">Авторизация</h2>
|
|
|
|
{% for field in form %}
|
|
{% if field.name == 'username' %}
|
|
<div class="control-group">
|
|
<div class="controls">
|
|
<div class="input-prepend">
|
|
<span class="add-on"><i class="icon-envelope"></i></span>
|
|
<input id="id_username" maxlength="254" name="username" type="text" placeholder="E-mail"/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% if field.help_text %}{{ field.help_text }}{% endif %}
|
|
{% if field.errors %}{{ field.errors }}{% endif %}
|
|
{% endif %}
|
|
{% if field.name == 'password' %}
|
|
<div class="control-group">
|
|
<div class="controls">
|
|
<div class="input-prepend">
|
|
<span class="add-on"><i class="icon-lock"></i></span>
|
|
<input id="id_password" maxlength="254" name="password" type="password" placeholder="Пароль"/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% if field.help_text %}{{ field.help_text }}{% endif %}
|
|
{% if field.errors %}{{ field.errors }}{% endif %}
|
|
{% endif %}
|
|
{% endfor %}
|
|
|
|
<ul class="inline">
|
|
<li style="vertical-align: top; margin-top: 5px;"><button class="btn btn-gs" type="submit">Войти</button></li>
|
|
<li class="pull-right" style="text-align: right"><a href="/register">Регистрация</a><br><a href="#">Забыли пароль?</a></li>
|
|
</ul>
|
|
</form>
|
|
|
|
{% endif %}
|
|
{% endblock %}
|
|
|
|
{% endcomment %}
|
|
<body>
|
|
{% if user.is_authenticated %}
|
|
{{ user.first_name }}. You ar loggened in currently.
|
|
But, you can <a href="/logout">logout</a>.<br/><br/>
|
|
{% else %}
|
|
|
|
{% if form.non_field_errors %}
|
|
{{ form.non_field_errors }}
|
|
{% endif %}
|
|
|
|
<div class="container">
|
|
<div class="row">
|
|
<div class="span5 offset4 well">
|
|
<legend>Войти в интерфейс администратора</legend>
|
|
{% if form.errors %}
|
|
<div class="alert alert-error">
|
|
<a class="close" data-dismiss="alert" href="#">×</a>Неправильный логин или пароль!
|
|
</div>
|
|
{% endif %}
|
|
<form method="POST" action="">{% csrf_token %}
|
|
<div class="input-prepend">
|
|
<span class="add-on"><i class="icon-envelope"></i></span>
|
|
<input type="text" id="username" class="span4" name="username" placeholder="Email">
|
|
</div>
|
|
<div class="input-prepend">
|
|
<span class="add-on"><i class="icon-lock"></i></span>
|
|
<input type="password" id="password" class="span4" name="password" placeholder="Пароль">
|
|
</div>
|
|
|
|
<button type="submit" name="submit" class="btn btn-info span4">Ввойти</button>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
|
|
</body>
|
|
|