-
초간단 Django 게시판 19. Sign up, 패스워드 관련 템플릿 수정Python/초간단 장고 Django 2021. 5. 30. 17:15반응형
별 내용은 없고...
하는 김에...https://github.com/pycrawling/betterSimpleDjangoBBS
<!--templates/accounts/signup.html--> {% extends 'base.html' %} {% block title %}Sign up{% endblock %} {% block content %} <style> #id_email{width: 100%; font-size: .875em;} form > input {font-size: .875em;} form > span {margin: 0; font-size: .875em;} form > label {margin: .6rem 0 0 0; font-size: .875em;} form > * {display:block;} form > button {margin: .6rem 0 0 0;} </style> <div class="card"> <div class="card-header"> Sign up </div> <div class="card-body"> <form method="post"> {% csrf_token %} {{ form.as_table }} <button class="btn btn-primary btn-sm" type="submit">Sign Up</button> </form> </div> </div> {% endblock %}
<!--templates/registration/password_reset_complete.html--> {% extends 'base.html' %} {% block title %}Password reset complete{% endblock %} {% block content %} <div class="d-flex justify-content-center"> <div class="card" style="width: 22rem;"> <div class="card-header"> Password reset complete </div> <div class="card-body"> <p>Your new password has been set. <br/> You can log in now on the <a href="{% url 'login' %}">log in page</a>. </p> </div> </div> </div> {% endblock %}
<!--templates/registration/password_reset_confirm.html--> {% extends 'base.html' %} {% block title %}Set a new password!{% endblock %} {% block content %} <style> #id_new_password1{width: 100%; font-size: .875em;} #id_new_password2{width: 100%; font-size: .875em;} form > label {margin: .6rem 0 0 0; font-size: .875em;} form > ul {font-size: .875em;} form > button {margin: .6rem 0 0 0;} form > * {display:block;} </style> <div class="d-flex justify-content-center"> <div class="card" style="width: 20rem;"> {% if validlink %} <div class="card-header"> Set a new password! </div> <div class="card-body"> <form method="POST"> {% csrf_token %} {{ form.as_p }} <input class="btn btn-primary btn-sm" type="submit" value="Change my password"> </form> </div> {% else %} <div class="card-header"> The password reset link was invalid </div> <div class="card-body"> <p>The password reset link was invalid, possibly because it has already been used. Please request a new password reset.</p> </div> <div class="card-footer text-end"> <a class="text-muted" href="/accounts/password_reset/"> <small>Password Reset</small> </a> </div> </div> </div> {% endif %} {% endblock %}
<!--templates/registration/password_reset_form.html--> {% extends 'base.html' %} {% block title %}Forgot your password?{% endblock %} {% block content %} <style> #id_email{width: 100%; font-size: .875em;} form > label {margin: .6rem 0 0 0; font-size: .875em;} form > button {margin: .6rem 0 0 0;} form > * {display:block;} </style> <div class="d-flex justify-content-center"> <div class="card" style="width:24rem"> <div class="card-header"> Forgot your password? </div> <div class="card-body"> <p class="card-text">Enter your email address below, and we'll email instructions for setting a new one.</p> <form method="POST"> {% csrf_token %} {{ form.as_p }} <input class="btn btn-primary btn-sm" type="submit" value="Send me instructions!"> </form> </div> </div> </div> {% endblock %}
반응형