Browse Source

Empezando con el recordatorio de contraseña

politica
Celestino Rey 1 year ago
parent
commit
73e9b7abc0
6 changed files with 116 additions and 7 deletions
  1. +2
    -2
      JugarAlPadel/K8S/Makefile.local
  2. +2
    -3
      JugarAlPadel/README.md
  3. +17
    -0
      JugarAlPadel/gestion_reservas/templates/base.html
  4. +0
    -2
      JugarAlPadel/gestion_reservas/templates/registration/login.html
  5. +20
    -0
      JugarAlPadel/gestion_reservas/templates/registration/password_change_done.html
  6. +75
    -0
      JugarAlPadel/gestion_reservas/templates/registration/password_change_form.html

+ 2
- 2
JugarAlPadel/K8S/Makefile.local View File

@ -2,8 +2,8 @@ export ARQUITECTURA := $(shell lscpu |grep itectur | tr -d ' '| cut -f2 -d':')
export REGISTRY=localhost:5000
#export REGISTRY=registry.reymota.es
export IMG_VERSION = 0.19
export IMG_NGINX_VERSION = 2.3
export IMG_VERSION = 0.21
export IMG_NGINX_VERSION = 2.4
# limpia todo
all: imagen clean install


+ 2
- 3
JugarAlPadel/README.md View File

@ -2,7 +2,7 @@
Desde el directorio K8S ejecutar make (esto hace todo: la imagen, para los pods y los lanza otra vez)
La primera vez, hay que entrar en el pod de vehículos con 'entra.sh' y
La primera vez, hay que entrar en el pod con 'entra.sh' y
python manage.py createsuperuser
@ -41,9 +41,8 @@ https://testdriven.io/blog/dockerizing-django-with-postgres-gunicorn-and-nginx/
## Cambiar la secuencia de lo sid
## Cambiar la secuencia de los id
ALTER SEQUENCE tablename_id_seq RESTART WITH nn;
esto se hace cuando restauro un volcado de la bd sobre una instalación nueva. Si hay índices ya creados, hay que reinciar a partir del último.

+ 17
- 0
JugarAlPadel/gestion_reservas/templates/base.html View File

@ -34,6 +34,23 @@
<li>
<a class="dropdown-item">{{ user.nombre }}</a>
</li>
<li><a class="dropdown-item">
<form method="post" action="{% url 'password_change' %}" >
{% csrf_token %}
<button
style="background: none!important;
border: none;
padding: 0!important;
/*optional*/
font-family: arial, sans-serif;
/*input has OS specific font-family*/
/*color: #069;
text-decoration: underline;*/
cursor: pointer;"
type="submit">Cambiar contraseña</button>
</form></a>
</li>
<li><a class="dropdown-item">
<form method="post" action="{% url 'logout' %}" >
{% csrf_token %}


+ 0
- 2
JugarAlPadel/gestion_reservas/templates/registration/login.html View File

@ -56,7 +56,6 @@
<a href="{{ password_reset_url }}">{% translate 'Forgotten your password or username?' %}</a>
</div>
{% endif %}
<p>Si quieres cambiar la contraseña <a href="{% url 'password_change' %}">pincha aquí</a></p>
<div class="text-center">
<input type="submit" class="btn app-btn-primary w-100 theme-btn mx-auto" value="{% translate 'Log in' %}">
@ -85,6 +84,5 @@
</div><!--//auth-background-col-->
</div><!--//row-->
</body>
</html>

+ 20
- 0
JugarAlPadel/gestion_reservas/templates/registration/password_change_done.html View File

@ -0,0 +1,20 @@
{% extends "admin/base_site.html" %}
{% load i18n %}
{% block userlinks %}
{% url 'django-admindocs-docroot' as docsroot %}{% if docsroot %}<a href="{{ docsroot }}">{% translate 'Documentation' %}</a> / {% endif %}{% translate 'Change password' %} /
<form id="logout-form" method="post" action="{% url 'admin:logout' %}">
{% csrf_token %}
<button type="submit">{% translate 'Log out' %}</button>
</form>
{% include "admin/color_theme_toggle.html" %}
{% endblock %}
{% block breadcrumbs %}
<div class="breadcrumbs">
<a href="{% url 'admin:index' %}">{% translate 'Home' %}</a>
&rsaquo; {% translate 'Password change' %}
</div>
{% endblock %}
{% block content %}
<p>{% translate 'Your password was changed.' %}</p>
{% endblock %}

+ 75
- 0
JugarAlPadel/gestion_reservas/templates/registration/password_change_form.html View File

@ -0,0 +1,75 @@
{% load i18n static %}
{% include "_head.html" %}
<body class="app app-login p-0">
<div class="row g-0 app-auth-wrapper">
<div class="col-12 col-md-7 col-lg-6 auth-main-col text-center p-5">
<div class="d-flex flex-column align-content-end">
<div class="app-auth-body mx-auto">
{% include "_branding.html" %}
<h2 class="auth-heading text-center mb-5">Cambio de contraseña</h2>
{% if form.errors and not form.non_field_errors %}
<p class="errornote">
{% blocktranslate count counter=form.errors.items|length %}Please correct the error below.{% plural %}Please correct the errors below.{% endblocktranslate %}
</p>
{% endif %}
<form class="auth-form login-form" action="{{ app_path }}" method="post" id="change-form">{% csrf_token %}
<p>{% translate '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>
<div class="password mb-3">
{{ form.old_password.errors }}
{{ form.old_password.label_tag }}
</div>
<div class="password mb-3">
{{ form.old_password }}
</div>
<div class="password mb-3">
{{ form.new_password.errors }}
{{ form.new_password.label_tag }}
</div>
<div class="password mb-3">
{{ form.new_password }}
</div>
<div class="password mb-3">
{{ form.new_password1.errors }}
{{ form.new_password1.label_tag }}
</div>
<div class="password mb-3">
{{ form.new_password1 }}
{% if form.new_password1.help_text %}
<div class="text mb-e"{% if form.new_password1.id_for_label %} id="{{ form.new_password1.id_for_label }}_helptext"{% endif %}>{{ form.new_password1.help_text|safe }}</div>
{% endif %}
</div>
<div class="password mb-3">
{{ form.new_password2.errors }}
{{ form.new_password2.label_tag }}
{{ form.new_password2 }}</div>
</div>
<div class="password mb-3">
{% if form.new_password2.help_text %}
<div class="help"{% if form.new_password2.id_for_label %} id="{{ form.new_password2.id_for_label }}_helptext"{% endif %}>{{ form.new_password2.help_text|safe }}</div>
{% endif %}
</div>
<div class="text-center">
<input type="submit" value="{% translate 'Change my password' %}" class="btn app-btn-primary w-100 theme-btn mx-auto">
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</body>

Loading…
Cancel
Save