diff options
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) + |