aboutsummaryrefslogtreecommitdiffstats
path: root/famille.py
diff options
context:
space:
mode:
authorGuillaume Horel <guillaume.horel@gmail.com>2018-11-19 15:55:47 -0500
committerGuillaume Horel <guillaume.horel@gmail.com>2018-11-19 15:55:47 -0500
commit468ebd25321c5eaec7e5d26eff86e62f237f18cb (patch)
tree27a35bebc81a90aa863594eeb891cb7dcc4cd0eb /famille.py
parent3a8225c6816d941c6c079af256cc57b143296efc (diff)
downloadfamille-flask-468ebd25321c5eaec7e5d26eff86e62f237f18cb.tar.gz
formatting
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,