Skip to content
This repository
branch: master
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 16 lines (15 sloc) 0.539 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
def js_reqs(page='console'):
    from plum.settings import EXTERNAL_JS, D3_JS, PLUGIN_JS, TEMPLATE_VARS, FP_JS, ADMIN_JS
    if page == 'admin':
        to_include = EXTERNAL_JS, D3_JS, PLUGIN_JS, ADMIN_JS
    elif page == 'old':
        to_include = EXTERNAL_JS, PLUGIN_JS, FP_JS_OLD
    else:
        to_include = EXTERNAL_JS, D3_JS, PLUGIN_JS, FP_JS

    js = []
    for i in to_include:
        for ii in i:
            if ii.find('http') == -1:
                ii = TEMPLATE_VARS['JS_URL'] + ii
            js.append(ii)
    return js
Something went wrong with that request. Please try again.