1 2 3 4 5 6 7
from ogcp import app import re @app.template_filter('remove_id') def remove_id(s): return re.sub(r'_\d+$', '', s)