Ejemplo n.º 1
0
def getSchema():
    startup = os.path.dirname(os.path.realpath(ZServer.Zope2.Startup.__file__))
    schemafile = os.path.join(startup, 'zopeschema.xml')
    opts = ZopeOptions()
    opts.schemafile = schemafile
    opts.load_schema()
    return opts.schema
Ejemplo n.º 2
0
def getSchema(schemafile):
    global _SCHEMA
    if schemafile not in _SCHEMA:
        opts = ZopeOptions()
        opts.schemafile = schemafile
        opts.load_schema()
        _SCHEMA[schemafile] = opts.schema
    return _SCHEMA[schemafile]
Ejemplo n.º 3
0
def getSchema():
    startup = os.path.dirname(
        os.path.realpath(ZServer.Zope2.Startup.__file__))
    schemafile = os.path.join(startup, 'zopeschema.xml')
    opts = ZopeOptions()
    opts.schemafile = schemafile
    opts.load_schema()
    return opts.schema
Ejemplo n.º 4
0
def getSchema(schemafile):
    global _SCHEMA
    if schemafile not in _SCHEMA:
        opts = ZopeOptions()
        opts.schemafile = schemafile
        opts.load_schema()
        _SCHEMA[schemafile] = opts.schema
    return _SCHEMA[schemafile]