PCv5/app/processors/utilities.py
Darks 3fb3ee40d2
fix: better PEP8
Flake8 returns less errors. I ignored lots of them though
2020-08-05 22:52:56 +02:00

16 lines
404 B
Python

from app import app
from flask import url_for
from config import V5Config
from slugify import slugify
@app.context_processor
def utilities_processor():
""" Add some utilities to render context """
return dict(
len=len,
# enumerate=enumerate,
_url_for=lambda route, args, **other: url_for(route, **args, **other),
V5Config=V5Config,
slugify=slugify,
)