From 5228c329b5cbaaa454f0e1c8b4d5a80a3c526bc5 Mon Sep 17 00:00:00 2001 From: Guillaume Horel Date: Sun, 30 Dec 2018 15:03:27 -0500 Subject: remove password update logic --- famille.py | 15 +-------------- templates/user/edit.html | 26 -------------------------- 2 files changed, 1 insertion(+), 40 deletions(-) diff --git a/famille.py b/famille.py index 69e216c..9de6aba 100644 --- a/famille.py +++ b/famille.py @@ -1,9 +1,8 @@ import sqlite3 #all the imports from flask import Flask, request, session, g, redirect,\ - url_for, render_template, flash, jsonify + url_for, render_template, jsonify from functools import wraps -import hashlib from pytz import timezone import pytz from docutils import core @@ -264,18 +263,6 @@ def edit_user(): return render_template("user/edit.html", user=user, timezones=pytz.common_timezones) elif request.method == 'POST': result = {} - try: - if request.form['password'] == request.form['password_confirm']: - result['password'] = (hashlib. - md5(request.form['password'].encode()). - hexdigest()) - else: - flash("Les deux mots de passe ne coïncident pas") - return render_template("user/edit.html", user=request.form, - timezones=pytz.common_timezones) - except KeyError: - pass - result['notify'] = "notify" in request.form for k in ["birthday", "nameday", "email", "phone", "adress_line1", "adress_line2", "adress_city_line", "timezone"]: diff --git a/templates/user/edit.html b/templates/user/edit.html index b9982db..c1204cf 100644 --- a/templates/user/edit.html +++ b/templates/user/edit.html @@ -14,38 +14,12 @@ class="form-horizontal">
Paramètres -

Laisser les champs vides si vous ne souhaitez pas changer de mot de passe.

-
- -
- -
-
-
- -
- -
-
- {% with messages = get_flashed_messages() %} - {% if messages %} - {% for message in messages %} - - {% endfor %} - {% endif %} - {% endwith %}
-- cgit v1.2.3-70-g09d2