Beispiel #1
0
def init_for(env):
    coaster.app.init_app(app, env)
    RQ(app)
    if app.config.get('SERVER_NAME'):
        subdomain = app.config.get('STATIC_SUBDOMAIN', 'static')
    else:
        subdomain = None
    app.add_url_rule('/static/<path:filename>', endpoint='static',
        view_func=app.send_static_file, subdomain=subdomain)
    baseframe.init_app(app, requires=['hasjob'],
        ext_requires=[('jquery.textarea-expander', 'jquery.tinymce', 'jquery.form', 'jquery.cookie',
        'select2', 'jquery.sparkline','jquery.nouislider'), 'firasans', 'baseframe-networkbar'])
    app.assets.register('js_tinymce', assets.require('tiny_mce.js>=3.5.0,<4.0.0'))
    if subdomain:
        # The /_baseframe path has to be under the current domain because TinyMCE
        # doesn't like loading from a subdomain, but we also need access to /_baseframe
        # in the static subdomain for other assets (potentially obsoleted by ext_requires)
        app.add_url_rule(baseframe.static_url_path + '/<path:filename>',
            view_func=baseframe.send_static_file,
            endpoint='baseframe_static', subdomain=subdomain)

    from hasjob.uploads import configure as uploads_configure
    from hasjob.search import configure as search_configure
    uploads_configure()
    search_configure()
    mail.init_app(app)
    lastuser.init_app(app)
    lastuser.init_usermanager(UserManager(db, models.User))
Beispiel #2
0
def init_for(env):
    coaster.app.init_app(app, env)
    RQ(app)

    baseframe.init_app(app,
                       requires=['hasjob'],
                       ext_requires=[
                           'baseframe-bs3',
                           ('jquery.textarea-expander', 'jquery.cookie',
                            'jquery.sparkline', 'jquery.nouislider'),
                           ('firasans', 'baseframe-firasans'),
                           'fontawesome>=4.0.0'
                       ])
    # TinyMCE has to be loaded by itself, unminified, or it won't be able to find its assets
    app.assets.register(
        'js_tinymce',
        assets.require('!jquery.js', 'tinymce.js>=4.0.0',
                       'jquery.tinymce.js>=4.0.0'))
    app.assets.register(
        'css_editor',
        Bundle('css/editor.css',
               filters=['cssrewrite', 'cssmin'],
               output='css/editor.packed.css'))

    from hasjob.uploads import configure as uploads_configure
    from hasjob.search import configure as search_configure
    uploads_configure()
    search_configure()
    mail.init_app(app)
    lastuser.init_app(app)
    lastuser.init_usermanager(UserManager(db, models.User))
Beispiel #3
0
def init_for(env):
    coaster.app.init_app(app, env)
    from hasjob.search import configure as search_configure
    from hasjob.uploads import configure as uploads_configure
    search_configure()
    uploads_configure()
    mail.init_app(app)
    lastuser.init_app(app)
    assets.register('js_all', js)
    assets.register('css_all', css)
Beispiel #4
0
def init_for(env):
    coaster.app.init_app(app, env)
    from hasjob.search import configure as search_configure
    from hasjob.uploads import configure as uploads_configure
    search_configure()
    uploads_configure()
    mail.init_app(app)
    lastuser.init_app(app)
    assets.register('js_all', js)
    assets.register('css_all', css)
Beispiel #5
0
def init_for(env):
    coaster.app.init_app(app, env)
    baseframe.init_app(app, requires=['jquery.textarea-expander', 
        'jquery.tinymce', 'jquery.form', 'jquery.cookie', 'select2', 'jquery.sparkline', 'baseframe-networkbar', 'hasjob'
        ])
    app.assets.register('js_tinymce', assets.require('tiny_mce.js>=3.5.0,<4.0.0'))
    from hasjob.search import configure as search_configure
    from hasjob.uploads import configure as uploads_configure
    search_configure()
    uploads_configure()
    mail.init_app(app)
    lastuser.init_app(app)
Beispiel #6
0
def init_for(env):
    coaster.app.init_app(app, env)
    RQ(app)
    if app.config.get('SERVER_NAME'):
        subdomain = app.config.get('STATIC_SUBDOMAIN', 'static')
    else:
        subdomain = None
    app.add_url_rule('/static/<path:filename>', endpoint='static',
        view_func=app.send_static_file, subdomain=subdomain)
    baseframe.init_app(app, requires=['jquery.textarea-expander',
        'jquery.tinymce', 'jquery.form', 'jquery.cookie', 'select2', 'jquery.sparkline', 'baseframe-networkbar', 'hasjob'
        ])
    app.assets.register('js_tinymce', assets.require('tiny_mce.js>=3.5.0,<4.0.0'))
    from hasjob.uploads import configure as uploads_configure
    from hasjob.search import configure as search_configure
    uploads_configure()
    search_configure()
    mail.init_app(app)
    lastuser.init_app(app)
Beispiel #7
0
def init_for(env):
    coaster.app.init_app(app, env)
    RQ(app)

    baseframe.init_app(app, requires=['hasjob'],
        ext_requires=['baseframe-bs3',
            ('jquery.textarea-expander', 'jquery.cookie', 'jquery.sparkline','jquery.nouislider', 'jquery.tinymce>=4.0.0'),
            ('firasans', 'baseframe-firasans'),
            'fontawesome>=4.0.0'])
    app.assets.register('js_tinymce', assets.require('tinymce.js>=4.0.0'))
    app.assets.register('css_editor', Bundle('css/editor.css',
        filters=['cssrewrite', 'cssmin'], output='css/editor.packed.css'))

    from hasjob.uploads import configure as uploads_configure
    from hasjob.search import configure as search_configure
    uploads_configure()
    search_configure()
    mail.init_app(app)
    lastuser.init_app(app)
    lastuser.init_usermanager(UserManager(db, models.User))
Beispiel #8
0
def configure(env='dev'):
    """Configure Hasjob's search indexing"""
    init_for(env)
    search_configure()