- #1
mathmari
Gold Member
MHB
- 5,049
- 7
Hey!
I have written a code in Python for a server to search for movies. At the site for the user I have added at the html template the options to change the password and to delete the account. For this do I have to write a separate html or a separate endpoint for these ones or can I write it as a box that appears only when I click on the specific option ? :unsure:
At the user.html so far I have written the following :
The box for changing the password is it better to be appeared only when I click on "Change password" or in a separate site? To be appeared only when we click on "Change password" it is done with Javascript, right? Would we write that insode my_body or at which point? Or do we have to create for that a new endpoint ?
:unsure:
I have written a code in Python for a server to search for movies. At the site for the user I have added at the html template the options to change the password and to delete the account. For this do I have to write a separate html or a separate endpoint for these ones or can I write it as a box that appears only when I click on the specific option ? :unsure:
At the user.html so far I have written the following :
Code:
{% extends "base_page.html" %}
{% block my_title %}My Profile{% endblock %}
{% block my_head %}
{% endblock %}
{% block my_body %}
<div class="col-md-6 offset-md-3">
<span class="anchor" id="formChangePassword"></span>
<hr class="mb-5">
<!-- form card change password -->
<div class="card card-outline-secondary">
<div class="card-header">
<h3 class="mb-0">Change Password</h3>
</div>
<div class="card-body">
<form class="form" role="form" autocomplete="off">
<div class="form-group">
<label for="inputPasswordOld">Current Password</label>
<input type="password" class="form-control" id="inputPasswordOld" required="">
</div>
<div class="form-group">
<label for="inputPasswordNew">New Password</label>
<input type="password" class="form-control" id="inputPasswordNew" required="">
<span class="form-text small text-muted">
The password must be 8-20 characters, and must <em>not</em> contain spaces.
</span>
</div>
<div class="form-group">
<label for="inputPasswordNewVerify">Verify</label>
<input type="password" class="form-control" id="inputPasswordNewVerify" required="">
<span class="form-text small text-muted">
To confirm, type the new password again.
</span>
</div>
<div class="form-group">
<button type="submit" class="btn btn-success btn-lg float-right">Save</button>
</div>
</form>
</div>
</div>
{% endblock %}
The box for changing the password is it better to be appeared only when I click on "Change password" or in a separate site? To be appeared only when we click on "Change password" it is done with Javascript, right? Would we write that insode my_body or at which point? Or do we have to create for that a new endpoint ?
:unsure: