working on forgotten pw

master
Glitch 2016-07-13 00:24:53 +00:00
parent f1f54ccd53
commit 92eb3e811e
2 changed files with 13 additions and 1 deletions

5
app.py
View File

@ -233,6 +233,11 @@ def confirm_email(confirmation_key):
flash("Incorrect confirmation key.") flash("Incorrect confirmation key.")
return redirect(url_for('user_dashboard')) return redirect(url_for('user_dashboard'))
@app.route('/forgot_password/', methods=["GET", "POST"])
def forgot_password():
if request.method == "GET":
return redirect(url_for('login'))
@app.route('/user/', methods=["GET", "POST"]) @app.route('/user/', methods=["GET", "POST"])
@decorators.login_required @decorators.login_required
def user_dashboard(): def user_dashboard():

View File

@ -15,7 +15,14 @@
<label for="password">Password</label> <label for="password">Password</label>
<input name="_csrf_token" type="hidden" value="{{ csrf_token() }}" /> <input name="_csrf_token" type="hidden" value="{{ csrf_token() }}" />
</div> </div>
<div class="row no-bot">
<div class="col s6">
<a href="{{ url_for('forgot_password') }}">Forgot password?</a>
</div>
<div class="col s6">
<button class="btn waves-effect waves-light right" type="submit">Login</button> <button class="btn waves-effect waves-light right" type="submit">Login</button>
</div>
</div>
</form> </form>
</div> </div>
{% endblock %} {% endblock %}