code: def metadata(request):
      
      conf = IdPConfig()
      conf.load(copy.deepcopy(settings.SAML_IDP_CONFIG))
      metadata = entity_descriptor(conf)
      return HttpResponse(content=text_type(metadata).encode('utf-8'), content_type="text/xml; charset=utf8")
docs: Returns an XML with the SAML 2.0 metadata for this Idp.
          The metadata is constructed on-the-fly based on the config dict in the django settings.