(view)
return _inner
Decorate this with any domain view that should be accessed via api only

    Currently only required by for a single view used by 'kawok-vc-desarrollo' domain
    See http://manage.dimagi.com/default.asp?225116#1137527
Decorate this with any domain view that should be accessed via api only
Decorate this with any domain view that should be accessed via api only
def api_domain_view(view):
    """
    Decorate this with any domain view that should be accessed via api only

    Currently only required by for a single view used by 'kawok-vc-desarrollo' domain
    See http://manage.dimagi.com/default.asp?225116#1137527
    """
    @wraps(view)
    @api_key()
    @login_and_domain_required
    def _inner(request, domain, *args, **kwargs):
        if request.user.is_authenticated:
            _ensure_request_couch_user(request)
            return view(request, domain, *args, **kwargs)
        else:
            return HttpResponseForbidden()
    return _inner
def api_domain_view ( view ) : @ wraps ( view ) @ api_key ( ) @ login_and_domain_required def _inner ( request , domain , * args , * * kwargs ) : if request . user . is_authenticated : _ensure_request_couch_user ( request ) return view ( request , domain , * args , * * kwargs ) else : return HttpResponseForbidden ( ) return _inner