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
def get_category_list(): """Consigue todas las categorias""" api = ezsteroids_api.API() return api.get_all_categories()
def _permission_user(user): api = ezsteroids_api.API() permissions_user = api.get_user_policies(user.username) return permissions_user
def get_user_category_list(user): api = ezsteroids_api.API() return api.get_categories(user)
def get_category_list(): api = ezsteroids_api.API() return api.get_all_categories()