import config from webApp import webApp import random, string import datetime DICT = {} @webApp.context_processor def example(): def randomString(stringLength=10): if config.config['WEB_APP']['environment'] == 'test': letters = string.ascii_lowercase return ''.join(random.choice(letters) for i in range(stringLength)) else: return config.config['WEB_APP']['FRONTEND_VERSION'] return dict(randomString = randomString)