|
2 | 2 | from datetime import timedelta |
3 | 3 |
|
4 | 4 | import flask |
| 5 | +import markupsafe |
5 | 6 | from sqlalchemy import func |
6 | 7 |
|
7 | 8 | from iris.user import requires_admin, requires_auth |
@@ -44,7 +45,7 @@ def users(): |
44 | 45 | users_json = [user.to_json() for user in users] |
45 | 46 |
|
46 | 47 | html = flask.render_template('admin/users.html', users=users_json, order_by=order_by, ascending=ascending) |
47 | | - return flask.render_template('admin/index.html', user=user, page=flask.Markup(html)) |
| 48 | + return flask.render_template('admin/index.html', user=user, page=markupsafe.Markup(html)) |
48 | 49 |
|
49 | 50 | @admin_app.route('/actions/<type>', methods=['GET']) |
50 | 51 | @requires_auth |
@@ -74,7 +75,7 @@ def actions(type): |
74 | 75 | 'admin/actions.html', action_type=type, actions=actions_json, |
75 | 76 | image_stats=image_stats, order_by=order_by, ascending=ascending |
76 | 77 | ) |
77 | | - return flask.render_template('admin/index.html', user=user, page=flask.Markup(html)) |
| 78 | + return flask.render_template('admin/index.html', user=user, page=markupsafe.Markup(html)) |
78 | 79 |
|
79 | 80 | @admin_app.route('/images', methods=['GET']) |
80 | 81 | @requires_auth |
@@ -117,4 +118,4 @@ def images(): |
117 | 118 | html = flask.render_template( |
118 | 119 | 'admin/images.html', images=images, order_by=order_by, ascending=ascending |
119 | 120 | ) |
120 | | - return flask.render_template('admin/index.html', user=user, page=flask.Markup(html)) |
| 121 | + return flask.render_template('admin/index.html', user=user, page=markupsafe.Markup(html)) |
0 commit comments