Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(4)  |  Call(3)  |  Derive(0)  |  Import(1)

src/k/a/KaraKara-HEAD/website/karakara/views/__init__.py   KaraKara(Download)
from externals.lib.pyramid import request_from_args, mark_external_request, method_delete_router, method_put_router, max_age, gzip
from externals.lib.pyramid.etag import etag, etag_decorator, _generate_cache_key_default
from externals.lib.pyramid.auto_format import auto_format_output, action_ok, action_error
from externals.lib.pyramid.session_identity import overlay_session_identity
 
    request = request_from_args(args)
    if not is_admin(request):
        raise action_error(message='Administrators only', code=403)
 
    return target(*args, **kwargs)
    request = request_from_args(args)
    if not is_comunity(request):
        raise action_error(message='Approved comunity users only', code=403)
 
    return target(*args, **kwargs)
    request = request_from_args(args)
    if not is_admin(request) and request.registry.settings.get('karakara.system.user.readonly'):
        raise action_error(message='normal users are in readonly mode', code=403)
 
    return target(*args, **kwargs)