def api_access_enabled_or_404(view_func):
 @wraps(view_func)
 def wrapped_view(view_obj, *args, **kwargs):
  'Wrapper for the view function.'
  if ApiAccessConfig.current().enabled:
   return view_func(view_obj, *args, **kwargs)
  return HttpResponseNotFound()
 return wrapped_view

def api_access_enabled_or_404 ( view_func ) : @ wraps ( view_func ) def wrapped_view ( view_obj , * args , ** kwargs ) : if ApiAccessConfig . current ( ) . enabled : return view_func ( view_obj , * args , ** kwargs ) return HttpResponseNotFound ( ) return wrapped_view
if api access management feature is not enabled .