Пример #1
0
def evaluate_category(user, category):
    if user.is_authenticated():
        api = ezsteroids_api.API()
        try:
            return api.check_category(user.username, category.slug)
        except ezsteroids_api.StatusException:
            return False
    else:
        return False
Пример #2
0
def get_category_list():
    """Consigue todas las categorias"""
    api = ezsteroids_api.API()
    return api.get_all_categories()
Пример #3
0
def _permission_user(user):
    api = ezsteroids_api.API()
    permissions_user = api.get_user_policies(user.username)
    return permissions_user
Пример #4
0
def get_user_category_list(user):
    api = ezsteroids_api.API()
    return api.get_categories(user)
Пример #5
0
def get_category_list():
    api = ezsteroids_api.API()
    return api.get_all_categories()