README.md edited
This commit is contained in:
@@ -0,0 +1,84 @@
|
||||
{% load i18n static jazzmin admin_urls %}
|
||||
{% get_current_language as LANGUAGE_CODE %}
|
||||
{% get_current_language_bidi as LANGUAGE_BIDI %}
|
||||
{% get_jazzmin_settings request as jazzmin_settings %}
|
||||
{% get_jazzmin_ui_tweaks as jazzmin_ui %}
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ LANGUAGE_CODE|default:"en-us" }}" {% if LANGUAGE_BIDI %}dir="rtl"{% endif %}>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
||||
|
||||
<title>{% block title %}{{ title }} | {{ jazzmin_settings.site_title }}{% endblock %}</title>
|
||||
|
||||
<!-- Font Awesome Icons -->
|
||||
<link rel="stylesheet" href="{% static "vendor/fontawesome-free/css/all.min.css" %}">
|
||||
|
||||
<!-- Bootstrap and adminLTE -->
|
||||
<link rel="stylesheet" href="{% static "vendor/adminlte/css/adminlte.min.css" %}">
|
||||
|
||||
<!-- Bootswatch theme -->
|
||||
{% if jazzmin_ui.theme.name != 'default' %}
|
||||
<link rel="stylesheet" href="{{ jazzmin_ui.theme.src }}" id="jazzmin-theme" />
|
||||
{% endif %}
|
||||
|
||||
{% if jazzmin_ui.dark_mode_theme %}
|
||||
<link rel="stylesheet" href="{{ jazzmin_ui.dark_mode_theme.src }}" id="jazzmin-dark-mode-theme" media="(prefers-color-scheme: dark)"/>
|
||||
{% endif %}
|
||||
|
||||
<!-- Custom fixes for django -->
|
||||
<link rel="stylesheet" href="{% static "jazzmin/css/main.css" %}">
|
||||
|
||||
{% if jazzmin_settings.custom_css %}
|
||||
<!-- Custom CSS -->
|
||||
<link rel="stylesheet" href="{% static jazzmin_settings.custom_css %}">
|
||||
{% endif %}
|
||||
|
||||
<!-- favicons -->
|
||||
<link rel="shortcut icon" href="{% static jazzmin_settings.site_icon %}" type="image/png">
|
||||
<link rel="icon" href="{% static jazzmin_settings.site_icon %}" sizes="32x32" type="image/png">
|
||||
|
||||
{% if jazzmin_settings.use_google_fonts_cdn %}
|
||||
<!-- Google Font: Source Sans Pro -->
|
||||
<link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700" rel="stylesheet">
|
||||
{% endif %}
|
||||
|
||||
{% block extrastyle %} {% endblock %}
|
||||
{% block extrahead %} {% endblock %}
|
||||
</head>
|
||||
<body class="hold-transition jazzmin-login-page">
|
||||
|
||||
<div class="login-box">
|
||||
<div class="login-logo">
|
||||
<h1>
|
||||
<picture>
|
||||
<source
|
||||
srcset="{% static jazzmin_settings.login_logo_dark %}"
|
||||
media="(prefers-color-scheme: dark)">
|
||||
<img src="{% static jazzmin_settings.login_logo %}" alt="{{ jazzmin_settings.site_header }}">
|
||||
</picture>
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
{% block content %} {% endblock %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- jQuery -->
|
||||
<script src="{% static "admin/js/vendor/jquery/jquery.js" %}"></script>
|
||||
<!-- Bootstrap 4 -->
|
||||
<script src="{% static 'vendor/bootstrap/js/bootstrap.min.js' %}"></script>
|
||||
<!-- AdminLTE App -->
|
||||
<script src="{% static 'vendor/adminlte/js/adminlte.min.js' %}"></script>
|
||||
|
||||
{% if jazzmin_settings.custom_js %}
|
||||
<script src="{% static jazzmin_settings.custom_js %}"></script>
|
||||
{% endif %}
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,13 @@
|
||||
{% extends "registration/base.html" %}
|
||||
|
||||
{% load i18n %}
|
||||
|
||||
{% block content %}
|
||||
<p class="login-box-msg">{{ jazzmin_settings.welcome_sign }}</p>
|
||||
<p class="text-center">
|
||||
{% trans "Thanks for spending some quality time with the Web site today." %}
|
||||
</p>
|
||||
<a class="btn {{ jazzmin_ui.button_classes.primary }} btn-block" href="{% url 'admin:index' %}">
|
||||
{% trans 'Log in again' %}
|
||||
</a>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,24 @@
|
||||
{% extends "admin/base_site.html" %}
|
||||
{% load i18n %}
|
||||
{% block userlinks %}
|
||||
{% url 'django-admindocs-docroot' as docsroot %}
|
||||
{% if docsroot %}<a href="{{ docsroot }}">{% trans 'Documentation' %}</a> / {% endif %}
|
||||
{% trans 'Change password' %} /
|
||||
<a href="{% url 'admin:logout' %}">{% trans 'Log out' %}</a>
|
||||
{% endblock %}
|
||||
{% block breadcrumbs %}
|
||||
<ol class="breadcrumb">
|
||||
<li class="breadcrumb-item"><a href="{% url 'admin:index' %}">{% trans 'Home' %}</a></li>
|
||||
<li class="breadcrumb-item active">{% trans 'Password change' %}</li>
|
||||
</ol>
|
||||
{% endblock %}
|
||||
|
||||
{% block title %}{{ title }}{% endblock %}
|
||||
{% block content_title %} {{ title }} {% endblock %}
|
||||
{% block content %}
|
||||
<div id="content-main" class="col-12">
|
||||
<div class="callout callout-success">
|
||||
<p>{% trans 'Your password was changed.' %}</p>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,120 @@
|
||||
{% extends "admin/base_site.html" %}
|
||||
{% load i18n static jazzmin %}
|
||||
{% get_jazzmin_ui_tweaks as jazzmin_ui %}
|
||||
|
||||
{# TODO: This should come through somewhere, also admin docs :( #}
|
||||
{% block userlinks %}
|
||||
{% url 'django-admindocs-docroot' as docsroot %}
|
||||
{% if docsroot %}<a href="{{ docsroot }}">{% trans 'Documentation' %}</a> / {% endif %}
|
||||
{% trans 'Change password' %} / <a href="{% url 'admin:logout' %}">{% trans 'Log out' %}</a>
|
||||
{% endblock %}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
<ol class="breadcrumb">
|
||||
<li class="breadcrumb-item"><a href="{% url 'admin:index' %}">{% trans 'Home' %}</a></li>
|
||||
<li class="breadcrumb-item active">{% trans 'Password change' %}</li>
|
||||
</ol>
|
||||
{% endblock %}
|
||||
|
||||
{% block title %}{{ title }}{% endblock %}
|
||||
{% block content_title %}{{ title }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-header with-border">
|
||||
<h4 class="card-title">
|
||||
<p>{% trans "Please enter your old password, for security's sake, and then enter your new password twice so we can verify you typed it in correctly." %}</p>
|
||||
</h4>
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<div id="content-main">
|
||||
<form method="post">{% csrf_token %}
|
||||
<div>
|
||||
{% if form.errors %}
|
||||
<div class="callout callout-danger">
|
||||
{% if errors|length == 1 %}{% trans "Please correct the error below." %}{% else %}{% trans "Please correct the errors below." %}{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<fieldset class="module aligned">
|
||||
<div class="row form-group">
|
||||
<div class="col-12 col-md-2">
|
||||
<label class="control-label float-md-right">
|
||||
{{ form.old_password.field.label }}
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-12 col-md-6">
|
||||
{{ form.old_password }}
|
||||
{% if form.old_password.help_text %}
|
||||
<div class="help-block">{{ form.old_password.help_text|safe }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="col-12 col-md-4">
|
||||
<div class="help-block text-red">
|
||||
{{ form.old_password.errors }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row form-group">
|
||||
<div class="col-12 col-md-2">
|
||||
<label class="control-label float-md-right">
|
||||
{{ form.new_password1.field.label }}
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-12 col-md-6">
|
||||
{{ form.new_password1 }}
|
||||
{% if form.new_password1.help_text %}
|
||||
<div class="help-block">{{ form.new_password1.help_text|safe }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="col-12 col-md-4">
|
||||
<div class="help-block text-red">
|
||||
{{ form.new_password1.errors }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row form-group">
|
||||
<div class="col-12 col-md-2">
|
||||
<label class="control-label float-md-right">
|
||||
{{ form.new_password2.field.label }}
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-12 col-md-6">
|
||||
{{ form.new_password2 }}
|
||||
{% if form.new_password1.help_text %}
|
||||
<div class="help-block">{{ form.new_password2.help_text|safe }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="col-12 col-md-4">
|
||||
<div class="help-block text-red">
|
||||
{{ form.new_password2.errors }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</fieldset>
|
||||
<div class="row">
|
||||
<div class="submit-row col-md-12 col-md-push-2">
|
||||
<input type="submit" value="{% trans 'Change password' %}" class="btn {{ jazzmin_ui.button_classes.primary }}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block extrajs %}
|
||||
<script>
|
||||
$('[required]').before('<span class="text-red" style="margin-left: -10px;">* </span>');
|
||||
</script>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,14 @@
|
||||
{% extends "registration/base.html" %}
|
||||
|
||||
{% load i18n %}
|
||||
|
||||
{% block content %}
|
||||
<p class="login-box-msg">{% trans "Your password has been set. You may go ahead and log in now." %}</p>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<a href="{{ login_url }}">
|
||||
<button class="btn {{ jazzmin_ui.button_classes.primary }} btn-block">{% trans 'Log in' %}</button>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,60 @@
|
||||
{% extends "registration/base.html" %}
|
||||
|
||||
{% load i18n %}
|
||||
|
||||
{% block content %}
|
||||
{% if validlink %}
|
||||
<p class="login-box-msg">
|
||||
{% trans "Please enter your new password twice so we can verify you typed it in correctly." %}
|
||||
</p>
|
||||
<form method="post">{% csrf_token %}
|
||||
{% if form.errors %}
|
||||
{% if form.new_password1.errors %}
|
||||
<div class="callout callout-danger">
|
||||
<p>{{ form.new_password1.label }}: {{ form.new_password1.errors|join:', ' }}</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if form.new_password2.errors %}
|
||||
<div class="callout callout-danger">
|
||||
<p>{{ form.new_password2.label }}: {{ form.new_password2.errors|join:', ' }}</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if form.non_field_errors %}
|
||||
<div class="callout callout-danger">
|
||||
{% for error in form.non_field_errors %}
|
||||
<p>{{ error }}</p>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
<input class="hidden" autocomplete="username" value="{{ form.user.get_username }}">
|
||||
<div class="input-group mb-3">
|
||||
<input type="password" name="new_password1" class="form-control" placeholder="{{ form.new_password1.label }}" required>
|
||||
<div class="input-group-append">
|
||||
<div class="input-group-text">
|
||||
<span class="fas fa-lock"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="input-group mb-3">
|
||||
<input type="password" name="new_password2" class="form-control" placeholder="{{ form.new_password2.label }}" required>
|
||||
<div class="input-group-append">
|
||||
<div class="input-group-text">
|
||||
<span class="fas fa-lock"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<button type="submit" class="btn {{ jazzmin_ui.button_classes.primary }} btn-block">
|
||||
{% trans 'Change my password' %}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{% else %}
|
||||
<p>
|
||||
{% trans "The password reset link was invalid, possibly because it has already been used. Please request a new password reset." %}
|
||||
</p>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,20 @@
|
||||
{% extends "registration/base.html" %}
|
||||
|
||||
{% load i18n %}
|
||||
|
||||
{% block content %}
|
||||
<p>
|
||||
{% blocktrans trimmed %}
|
||||
We’ve emailed you instructions for setting your password,
|
||||
if an account exists with the email you entered.
|
||||
You should receive them shortly.
|
||||
{% endblocktrans %}
|
||||
</p>
|
||||
<p>
|
||||
{% blocktrans trimmed %}
|
||||
If you don’t receive an email, please make sure
|
||||
you’ve entered the address you registered with,
|
||||
and check your spam folder.
|
||||
{% endblocktrans %}
|
||||
</p>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,46 @@
|
||||
{% extends "registration/base.html" %}
|
||||
|
||||
{% load i18n jazzmin %}
|
||||
{% get_jazzmin_ui_tweaks as jazzmin_ui %}
|
||||
|
||||
{% block content %}
|
||||
<p class="login-box-msg">
|
||||
{% blocktrans trimmed %}
|
||||
Forgotten your password?
|
||||
Enter your email address below, and we’ll
|
||||
email instructions for setting a new one.
|
||||
{% endblocktrans %}
|
||||
</p>
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
{% if form.errors %}
|
||||
{% if form.email.errors %}
|
||||
<div class="callout callout-danger">
|
||||
<p>{{ form.email.label }}: {{ form.email.errors|join:', ' }}</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if form.non_field_errors %}
|
||||
<div class="callout callout-danger">
|
||||
{% for error in form.non_field_errors %}
|
||||
<p>{{ error }}</p>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
<div class="input-group mb-3">
|
||||
<input type="text" name="email" class="form-control" placeholder="{{ form.email.label }}" required>
|
||||
<div class="input-group-append">
|
||||
<div class="input-group-text">
|
||||
<span class="fas fa-envelope"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<button type="submit" class="btn {{ jazzmin_ui.button_classes.primary }} btn-block">
|
||||
{% trans 'Reset my password' %}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user