aboutsummaryrefslogtreecommitdiffstats
path: root/famille.py
diff options
context:
space:
mode:
Diffstat (limited to 'famille.py')
-rw-r--r--famille.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/famille.py b/famille.py
index 4310b0c..1ad2465 100644
--- a/famille.py
+++ b/famille.py
@@ -40,8 +40,9 @@ def shortify(string):
def format_date(date_object, format="%a %d %b %Y à %Hh%M"):
if not date_object:
return ""
- return date_object.replace(tzinfo=timezone('utc')).\
- astimezone(timezone(session['timezone'])).strftime(format)
+ return (date_object.replace(tzinfo=timezone('utc')).
+ astimezone(timezone(session['timezone'])).
+ strftime(format))
@app.template_filter('format_ago')
@@ -259,8 +260,9 @@ def edit_user():
result = {}
try:
if request.form['password'] == request.form['password_confirm']:
- result['password'] = hashlib.md5(request.form['password'].encode()).\
- hexdigest()
+ result['password'] = (hashlib.
+ md5(request.form['password'].encode()).
+ hexdigest())
else:
error = "Les deux mots de passe ne coïncident pas"
return render_template("user/edit.html", user=request.form,