@register.filter(is_safe=True)
def random(value):
 return random_module.choice(value)

@ register . filter ( is_safe = True ) def random ( value ) : return random_module . choice ( value )
random() -> str get a random user agent string .