def get_variables(context):
    """
    Given a template context, return a sorted list of variable names in that
    context
    """
    variables = set(context.flatten().keys())
    try:
        variables.remove('block')
    except KeyError:
        pass
    return sorted(list(variables))
