Files
notifications-admin/app/url_converters.py
T

12 lines
304 B
Python
Raw Normal View History

from werkzeug.routing import BaseConverter
2020-07-01 16:43:08 +01:00
from app.models.service import Service
2020-03-24 15:36:39 +00:00
class TemplateTypeConverter(BaseConverter):
regex = "(?:{})".format("|".join(Service.TEMPLATE_TYPES))
class SimpleDateTypeConverter(BaseConverter):
regex = r"([12]\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01]))"