Skip to content
Snippets Groups Projects
Commit 2c6767e8 authored by kaiyou's avatar kaiyou
Browse files

Display time to deletion in user details

parent c75b0309
No related branches found
No related tags found
No related merge requests found
...@@ -117,7 +117,7 @@ class User(db.Model): ...@@ -117,7 +117,7 @@ class User(db.Model):
return profile return profile
@classmethod @classmethod
def get_timeout(self): def get_timeout(cls):
""" Return the configured timeout delta as a timedelta """ Return the configured timeout delta as a timedelta
""" """
return datetime.timedelta(seconds=int(app.config.get("USER_TIMEOUT"))) return datetime.timedelta(seconds=int(app.config.get("USER_TIMEOUT")))
......
...@@ -27,6 +27,11 @@ ...@@ -27,6 +27,11 @@
<dd class="col-sm-9">{{ value }}</dd> <dd class="col-sm-9">{{ value }}</dd>
{% endfor %} {% endfor %}
{% endif %} {% endif %}
{% if user.time_to_deletion() %}
<dt class="col-sm-3">{% trans %}Deleted in{% endtrans %}</dt>
<dd class="col-sm-9">{{ utils.babel.dates.format_timedelta(user.time_to_deletion()) }}</dd>
{% endif %}
</dl> </dl>
</div> </div>
</div> </div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment