@csrf_exempt
def csw_global_dispatch(request):
 if (settings.CATALOGUE['default']['ENGINE'] != 'geonode.catalogue.backends.pycsw_local'):
  return HttpResponseRedirect(settings.CATALOGUE['default']['URL'])
 mdict = dict(settings.PYCSW['CONFIGURATION'], **CONFIGURATION)
 env = request.META.copy()
 env.update({'local.app_root': os.path.dirname(__file__), 'REQUEST_URI': request.build_absolute_uri()})
 csw = server.Csw(mdict, env, version='2.0.2')
 content = csw.dispatch_wsgi()
 if isinstance(content, list):
  content = content[1]
 return HttpResponse(content, content_type=csw.contenttype)

@ csrf_exempt def csw_global_dispatch ( request ) : if ( settings . CATALOGUE [ 'default' ] [ 'ENGINE' ] != 'geonode.catalogue.backends.pycsw_local' ) : return HttpResponseRedirect ( settings . CATALOGUE [ 'default' ] [ 'URL' ] ) mdict = dict ( settings . PYCSW [ 'CONFIGURATION' ] , ** CONFIGURATION ) env = request . META . copy ( ) env . update ( { 'local.app_root' : os . path . dirname ( __file__ ) , 'REQUEST_URI' : request . build_absolute_uri ( ) } ) csw = server . Csw ( mdict , env , version = '2.0.2' ) content = csw . dispatch_wsgi ( ) if isinstance ( content , list ) : content = content [ 1 ] return HttpResponse ( content , content_type = csw . contenttype )
pycsw wrapper .