diff options
author | Frederick Yin <fkfd@fkfd.me> | 2021-10-21 00:21:12 +0800 |
---|---|---|
committer | Frederick Yin <fkfd@fkfd.me> | 2021-10-21 00:21:12 +0800 |
commit | abcde5044ee86b4232b30736634db2368564d5a0 (patch) | |
tree | 66c7390e3abb3ce13f41b7c051688366fdce3ebd /jimbrella/web.py | |
parent | a4afe5313523fbc726415e2025b409193840709c (diff) |
Mobile view for /admin/umbrellas
Diffstat (limited to 'jimbrella/web.py')
-rw-r--r-- | jimbrella/web.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/jimbrella/web.py b/jimbrella/web.py index 73b0659..0b32ce0 100644 --- a/jimbrella/web.py +++ b/jimbrella/web.py @@ -1,4 +1,5 @@ from flask import Flask, request, render_template +from user_agents import parse as user_agent from .database import Database from .config import * @@ -26,6 +27,7 @@ def admin_umbrellas(): return render_template( "admin/umbrellas.html", umbrellas=umbrellas, + mobile=user_agent(request.user_agent.string).is_mobile, ) |