Skip to content

Commit

Permalink
adding a plotly example
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicholas Kridler committed Feb 29, 2016
1 parent 7f72e14 commit 9bfae0e
Show file tree
Hide file tree
Showing 5 changed files with 163,785 additions and 98 deletions.
24 changes: 14 additions & 10 deletions examples/plotly/demo/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,28 +12,32 @@
app = Flask(__name__)

ui = make_ui(here+"/fitbit_data.csv")
ui.render_layout(app, "./assets/scripts/app.js")
ui.render_layout(app, "./demo/static/layout.js")

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

scripts = [
# "./bower_components/jquery/dist/jquery.min.js",
"./plotly.js"
]

css = [
"./bower_components/bootstrap/dist/css/bootstrap.min.css",
"./css/main.css"
]

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

if __name__ == "__main__":
app.run(debug=True)
Loading

0 comments on commit 9bfae0e

Please sign in to comment.