Ejemplo n.º 1
0
 def read(self, request, version):
     check_version(version)
     rack_controller = find_rack_controller(request)
     # XXX: Set a charset for text/plain. Django automatically encodes
     # non-binary content using DEFAULT_CHARSET (which is UTF-8 by default)
     # but only sets the charset parameter in the content-type header when
     # a content-type is NOT provided.
     return HttpResponse(
         get_enlist_userdata(rack_controller=rack_controller),
         content_type="text/plain")
Ejemplo n.º 2
0
 def read(self, request, version):
     check_version(version)
     nodegroup = find_nodegroup(request)
     return HttpResponse(
         get_enlist_userdata(nodegroup=nodegroup), mimetype="text/plain")