Ejemplo n.º 1
0
def install(app):
    app.add_handlers('.*', [
        URLSpec(r'/collection/add',
                CollectionAddHandler,
                name='collection_add'),
        URLSpec(r'/collection/list',
                hbase.genPageHandler('collection_lst'),
                name='collection_lst'),
        URLSpec(r'/api/collection_lst.json',
                CollectionListDataHandler,
                name='api_collection_lst'),
    ])
Ejemplo n.º 2
0
def install(app):
    w = ImporterWorker(app.settings['session'],
                       app.settings['home'],
                       app.settings['scrapper'])
    app.add_handlers('.*', [
        # Importer:
        URLSpec(r'/importer/add',
                ImporterAddHandler,
                dict(worker=w),
                name='importer_add'),
        URLSpec(r'/importer/list',
                hbase.genPageHandler('importer_lst'),
                name='importer_lst'),
        URLSpec(r'/api/importer_lst.json',
                ImporterDataHandler,
                name='api_importer_lst'),
        URLSpec(r'/api/importer_clear',
                ImporterClearHandler,
                name='api_importer_clear'),
    ])