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
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):