diff options
| author | Guillaume Horel <guillaume.horel@gmail.com> | 2018-11-19 15:55:47 -0500 |
|---|---|---|
| committer | Guillaume Horel <guillaume.horel@gmail.com> | 2018-11-19 15:55:47 -0500 |
| commit | 468ebd25321c5eaec7e5d26eff86e62f237f18cb (patch) | |
| tree | 27a35bebc81a90aa863594eeb891cb7dcc4cd0eb /famille.py | |
| parent | 3a8225c6816d941c6c079af256cc57b143296efc (diff) | |
| download | famille-flask-468ebd25321c5eaec7e5d26eff86e62f237f18cb.tar.gz | |
formatting
Diffstat (limited to 'famille.py')
| -rw-r--r-- | famille.py | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -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, |
