Esempio n. 1
0
    initComplete=addfunc,
    drawCallback=drawfunc,
)


app = Flask(__name__)
tb.register_route(app)

ui = SimpleComponent("Table", "./static/bower_components/pyxley/build/pyxley.js", "component_id", tb.params)

sb2 = SelectButton("SelectButton", ["Item1", "Item2"], "slide2", tb.params)
ui2 = SimpleComponent("SelectButton", "./static/bower_components/pyxley/build/pyxley.js", "slide2", sb2.params)

# ui2.add_filter(sb2)

sb = ui.render("./static/layout.js")
sb1 = ui2.render("./static/layout2.js")
# sb2s = sb2.register_route(app)
# sb2s = sb2.to_js()


@app.route("/test", methods=["GET"])
def testtest():
    return jsonify(jsfunc)


@app.route("/", methods=["GET"])
@app.route("/index", methods=["GET"])
def index():
    _scripts = ["./layout.js", "./layout2.js"]
    return render_template("index.html", title=TITLE, base_scripts=scripts, page_scripts=_scripts, css=css)
Esempio n. 2
0
app = Flask(__name__)
tb.register_route(app)

ui = SimpleComponent("Table",
                     "./static/bower_components/pyxley/build/pyxley.js",
                     "component_id", tb.params)

sb2 = SelectButton("SelectButton", ["Item1", "Item2"], "slide2", tb.params)
ui2 = SimpleComponent("SelectButton",
                      "./static/bower_components/pyxley/build/pyxley.js",
                      "slide2", sb2.params)

#ui2.add_filter(sb2)

sb = ui.render("./static/layout.js")
sb1 = ui2.render("./static/layout2.js")
#sb2s = sb2.register_route(app)
#sb2s = sb2.to_js()


@app.route('/test', methods=["GET"])
def testtest():
    return jsonify(jsfunc)


@app.route('/', methods=["GET"])
@app.route('/index', methods=["GET"])
def index():
    _scripts = ["./layout.js", "./layout2.js"]
    return render_template('index.html',
Esempio n. 3
0
    initComplete=addfunc,
    drawCallback=drawfunc)


app = Flask(__name__)
tb.register_route(app)


ui = SimpleComponent(
    "Table",
    "pyxley",
    "component_id",
    tb.params
)

sb = ui.render("./project/static/layout.js")

# Create a webpack file and bundle our javascript
from pyxley.utils import Webpack
wp = Webpack(".")
wp.create_webpack_config(
    "layout.js",
    "./project/static/",
    "bundle",
    "./project/static/"
)
wp.run()

@app.route('/test', methods=["GET"])
def testtest():
    return jsonify(jsfunc)
Esempio n. 4
0
File: app.py Progetto: Dmdv/pyxley
    initComplete=addfunc,
    drawCallback=drawfunc)


app = Flask(__name__)
tb.register_route(app)


ui = SimpleComponent(
    "Table",
    "./static/bower_components/pyxley/build/pyxley.js",
    "component_id",
    tb.params
)

sb = ui.render("./static/layout.js")

@app.route('/test', methods=["GET"])
def testtest():
    return jsonify(jsfunc)

@app.route('/', methods=["GET"])
@app.route('/index', methods=["GET"])
def index():
    _scripts = [
        "./layout.js"
        ]
    return render_template('index.html',
        title=TITLE,
        base_scripts=scripts,
        page_scripts=_scripts,
Esempio n. 5
0
    deferRender=True,
    initComplete=addfunc,
    drawCallback=drawfunc)


app = Flask(__name__)
tb.register_route(app)

ui = SimpleComponent(
    "Table",
    "./static/bower_components/pyxley/build/pyxley.js",
    "component_id",
    tb.params
)

sb = ui.render("./static/layout.js")

@app.route('/test', methods=["GET"])
def testtest():
    return jsonify(jsfunc)

@app.route('/', methods=["GET"])
@app.route('/index', methods=["GET"])
def index():
    _scripts = [
        "./layout.js"
        ]
    return render_template('index.html',
        title=TITLE,
        base_scripts=scripts,
        page_scripts=_scripts,