Esempio 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
Esempio 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]
Esempio 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
Esempio 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]