diff --git a/cps/jinjia.py b/cps/jinjia.py index ebb53a30..688d1fba 100644 --- a/cps/jinjia.py +++ b/cps/jinjia.py @@ -25,6 +25,7 @@ from __future__ import division, print_function, unicode_literals import datetime import mimetypes +from uuid import uuid4 from babel.dates import format_date from flask import Blueprint, request, url_for @@ -127,3 +128,8 @@ def formatseriesindex_filter(series_index): return series_index return 0 +@jinjia.app_template_filter('uuidfilter') +def uuidfilter(var): + return uuid4() + + diff --git a/cps/templates/book_edit.html b/cps/templates/book_edit.html index 16c02fae..003b33f9 100644 --- a/cps/templates/book_edit.html +++ b/cps/templates/book_edit.html @@ -3,7 +3,7 @@ {% if book %}