X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/dbb1ae2cf25105f7a3831961b08386a1326baef8..4bb3e264dc9d9953c6a1ffcb0290a2ba0e0c094b:/apps/oai/views.py?ds=inline diff --git a/apps/oai/views.py b/apps/oai/views.py index 100267131..5bb902508 100644 --- a/apps/oai/views.py +++ b/apps/oai/views.py @@ -6,6 +6,7 @@ from oai.handlers import Catalogue, NS_DCTERMS, nsdcterms from oaipmh.server import ServerBase, NS_OAIDC, NS_DC, NS_XSI, nsoaidc, nsdc from oaipmh.metadata import MetadataRegistry from django.http import HttpResponse +from django.utils.functional import SimpleLazyObject from lxml.etree import SubElement @@ -57,8 +58,10 @@ metadata_registry.registerWriter('oai_dc', fbc_oai_dc_writer) metadata_registry.registerWriter('qdc', qdc_writer) -server = ServerBase(Catalogue(metadata_registry), metadata_registry, - {'topxsi': NS_XSI}) +server = SimpleLazyObject(lambda: + ServerBase(Catalogue(metadata_registry), metadata_registry, + {'topxsi': NS_XSI}) + ) def oaipmh(request):