Ejemplo n.º 1
0
try:
    from infogami.plugins.api import code as api
except:
    api = None

# http header extension for OL API
infogami.config.http_ext_header_uri = "http://openlibrary.org/dev/docs/api"

# setup special connection with caching support
import connection
client._connection_types['ol'] = connection.OLConnection
infogami.config.infobase_parameters = dict(type="ol")

# set up infobase schema. required when running in standalone mode.
from openlibrary.core import schema
schema.register_schema()

if infogami.config.get('infobase_server') is None:
    # setup infobase hooks for OL
    from openlibrary.plugins import ol_infobase
    ol_infobase.init_plugin()

from openlibrary.core import models
models.register_models()
models.register_types()


# this adds /show-marc/xxx page to infogami
import showmarc

# Remove movefiles install hook. openlibrary manages its own files.
Ejemplo n.º 2
0
try:
    from infogami.plugins.api import code as api
except:
    api = None

# http header extension for OL API
infogami.config.http_ext_header_uri = 'http://openlibrary.org/dev/docs/api'

# setup special connection with caching support
from openlibrary.plugins.openlibrary import connection
client._connection_types['ol'] = connection.OLConnection
infogami.config.infobase_parameters = dict(type='ol')

# set up infobase schema. required when running in standalone mode.
from openlibrary.core import schema
schema.register_schema()

from openlibrary.core import models
models.register_models()
models.register_types()

# Remove movefiles install hook. openlibrary manages its own files.
infogami._install_hooks = [h for h in infogami._install_hooks if h.__name__ != 'movefiles']

from openlibrary.plugins.openlibrary import lists
lists.setup()

logger = logging.getLogger('openlibrary')


class hooks(client.hook):