@contextfilter
def random_every_time(context, values):
    "Choose a random value.\n\n    Unlike Jinja's random filter,\n    this is context-dependent to avoid caching the chosen value.\n    "
    return random.choice(values)
Choose a random value.

Unlike Jinja's random filter,
this is context-dependent to avoid caching the chosen value.
@contextfilter
def random_every_time(context, values):
    "Choose a random value.\n\n    Unlike Jinja's random filter,\n    this is context-dependent to avoid caching the chosen value.\n    "
    return random.choice(values)