diff options
author | Javier Hernandez <jhernandez@soleta.eu> | 2023-12-21 12:19:49 +0100 |
---|---|---|
committer | OpenGnSys Support Team <soporte-og@soleta.eu> | 2023-12-21 12:22:44 +0100 |
commit | 555460f982e733136360a770698e2eb01099f311 (patch) | |
tree | 3a038d954ed5da49a7810f66d9257624cc080468 /ogcp/filters.py | |
parent | 52c5555f659db69995296c6b3bad68244ceeb2f4 (diff) |
Remove id from client's bubbles
Remove id from client's bubbles in the following commands: Power
(Poweroff, Poweron, Reboot); Setup (Set boot mode, Set ogLive); Client
(Start session)
To make the string replacement, a custom jinja filter has been created
Diffstat (limited to 'ogcp/filters.py')
-rw-r--r-- | ogcp/filters.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ogcp/filters.py b/ogcp/filters.py new file mode 100644 index 0000000..0d705a5 --- /dev/null +++ b/ogcp/filters.py @@ -0,0 +1,7 @@ +from ogcp import app +import re + +@app.template_filter('remove_id') +def remove_id(s): + return re.sub(r'_\d+$', '', s) + |