Beispiel #1
0
 def load_entries(self):
     connect(yeti_config.mongodb.database,
             host=yeti_config.mongodb.host,
             port=yeti_config.mongodb.port,
             username=yeti_config.mongodb.username,
             password=yeti_config.mongodb.password,
             connect=False)
     from core.yeti_plugins import get_plugins
     self.loaded_entries = get_plugins()
Beispiel #2
0
 def load_entries(self):
     connect(
         yeti_config.mongodb.database,
         host=yeti_config.mongodb.host,
         port=yeti_config.mongodb.port,
         username=yeti_config.mongodb.username,
         password=yeti_config.mongodb.password,
         connect=False)
     from core.yeti_plugins import get_plugins
     self.loaded_entries = get_plugins()
Beispiel #3
0
def connect_mongo(**kwargs):
    """Connect to mongo and load modules in each worker process."""
    from core.config import celeryimports
    from core.yeti_plugins import get_plugins
    connect(yeti_config.mongodb.database,
            host=yeti_config.mongodb.host,
            port=yeti_config.mongodb.port,
            username=yeti_config.mongodb.username,
            password=yeti_config.mongodb.password,
            connect=False)
    celeryimports.loaded_modules = get_plugins()
Beispiel #4
0
def connect_mongo(**kwargs):
    """Connect to mongo and load modules in each worker process."""
    from core.config import celeryimports
    from core.yeti_plugins import get_plugins
    connect(
        yeti_config.mongodb.database,
        host=yeti_config.mongodb.host,
        port=yeti_config.mongodb.port,
        username=yeti_config.mongodb.username,
        password=yeti_config.mongodb.password,
        connect=False)
    celeryimports.loaded_modules = get_plugins()
Beispiel #5
0
 def load_entries(self):
     from core.yeti_plugins import get_plugins
     self.loaded_entries = get_plugins()
Beispiel #6
0
from __future__ import unicode_literals

from core.yeti_plugins import get_plugins
loaded_modules = get_plugins()
Beispiel #7
0
import os
from importlib import import_module
from bson.json_util import dumps

from flask import Flask, url_for, request
from flask_login import LoginManager, current_user

from core.user import User
from core.web.json import JSONDecoder
from core.web.api import api
from core.web.frontend import frontend
from mongoengine.errors import DoesNotExist
from core.yeti_plugins import get_plugins

# Make sure plugins are loaded
get_plugins()

webapp = Flask(__name__,
               static_folder='../../node_modules',
               static_url_path='/static')

webapp.secret_key = os.urandom(24)
webapp.json_decoder = JSONDecoder

login_manager = LoginManager()
login_manager.init_app(webapp)
login_manager.login_view = '/login'

auth_module = import_module('core.auth.local')
webapp.register_blueprint(auth_module.auth)
Beispiel #8
0
 def load_entries(self):
     from core.yeti_plugins import get_plugins
     self.loaded_entries = get_plugins()