Пример #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
Пример #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]
Пример #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
Пример #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]