|
@ -18,10 +18,15 @@ class LexmlProvedorCrud(Crud): |
|
|
class DetailView(Crud.DetailView): |
|
|
class DetailView(Crud.DetailView): |
|
|
layout_key = 'LexmlProvedorDetail' |
|
|
layout_key = 'LexmlProvedorDetail' |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def lexml_request(request): |
|
|
def lexml_request(request): |
|
|
|
|
|
request_dict = request.GET.copy() |
|
|
|
|
|
if request_dict.get('batch_size'): |
|
|
|
|
|
del request_dict['batch_size'] |
|
|
|
|
|
|
|
|
config = get_config(request.get_raw_uri(), int(request.GET.get('batch_size', '10'))) |
|
|
config = get_config(request.get_raw_uri(), int(request.GET.get('batch_size', '10'))) |
|
|
oai_server = OAIServerFactory(config) |
|
|
oai_server = OAIServerFactory(config) |
|
|
r = oai_server.handleRequest(request.GET) |
|
|
r = oai_server.handleRequest(request_dict) |
|
|
response = r.decode('UTF-8') |
|
|
response = r.decode('UTF-8') |
|
|
return HttpResponse(response, content_type='text/xml') |
|
|
return HttpResponse(response, content_type='text/xml') |
|
|
|
|
|
|
|
|