Browse Source

Formulario de signup con estilo

politica
Celestino Rey 1 year ago
parent
commit
8110fccc46
2 changed files with 13 additions and 3 deletions
  1. +1
    -2
      Libros/biblioteca/gestion/forms.py
  2. +12
    -1
      Libros/biblioteca/gestion/templates/registration/signup.html

+ 1
- 2
Libros/biblioteca/gestion/forms.py View File

@ -31,8 +31,7 @@ class ReyMotaUserCreationForm(UserCreationForm):
class Meta: class Meta:
model = ReyMotaUser model = ReyMotaUser
fields = ("email", "foto")
fields = ("email", "nombre", "foto")
class ReyMotaUserChangeForm(UserChangeForm): class ReyMotaUserChangeForm(UserChangeForm):


+ 12
- 1
Libros/biblioteca/gestion/templates/registration/signup.html View File

@ -13,7 +13,18 @@
<form class="auth-form auth-signup-form" method="POST" enctype="multipart/form-data"> <form class="auth-form auth-signup-form" method="POST" enctype="multipart/form-data">
{% csrf_token %} {% csrf_token %}
{{ form }}
{% for field in form %}
<p>
{{ field.label_tag }}<br>
{{ field }}
{% if field.help_text %}
<small style="color: grey">{{ field.help_text }}</small>
{% endif %}
{% for error in field.errors %}
<p style="color: red">{{ error }}</p>
{% endfor %}
</p>
{% endfor %}
<div class="item border-bottom py-3"></div> <div class="item border-bottom py-3"></div>
<div class="text-center"> <div class="text-center">
<button type="submit" class="btn app-btn-primary w-100 theme-btn mx-auto">Sign Up</button> <button type="submit" class="btn app-btn-primary w-100 theme-btn mx-auto">Sign Up</button>


Loading…
Cancel
Save