From 666f49588393f9fa628c9754274db13f6f08811c Mon Sep 17 00:00:00 2001 From: lpashwin Date: Wed, 10 Apr 2019 13:55:20 -0500 Subject: [PATCH 1/2] Update manage.py --- manage.py | 36 +++++++++++++++++++++++++++++------- 1 file changed, 29 insertions(+), 7 deletions(-) diff --git a/manage.py b/manage.py index eb3ab8af5..dbdd410e9 100755 --- a/manage.py +++ b/manage.py @@ -1,10 +1,32 @@ -#!/usr/bin/env python -import os -import sys +# -*- coding: utf-8 -*- +import dash +import dash_core_components as dcc +import dash_html_components as html -if __name__ == "__main__": - os.environ.setdefault("DJANGO_SETTINGS_MODULE", "gettingstarted.settings") +external_stylesheets = ['https://codepen.io/chriddyp/pen/bWLwgP.css'] - from django.core.management import execute_from_command_line +app = dash.Dash(__name__, external_stylesheets=external_stylesheets) - execute_from_command_line(sys.argv) +app.layout = html.Div(children=[ + html.H1(children='Hello Dash'), + + html.Div(children=''' + Dash: A web application framework for Python. + '''), + + dcc.Graph( + id='example-graph', + figure={ + 'data': [ + {'x': [1, 2, 3], 'y': [4, 1, 2], 'type': 'bar', 'name': 'SF'}, + {'x': [1, 2, 3], 'y': [2, 4, 5], 'type': 'bar', 'name': u'Montréal'}, + ], + 'layout': { + 'title': 'Dash Data Visualization' + } + } + ) +]) + +if __name__ == '__main__': + app.run_server(debug=True) From 8dbf0303f67dea6bc294570b74d9d2667e25aad5 Mon Sep 17 00:00:00 2001 From: lpashwin Date: Wed, 10 Apr 2019 13:59:40 -0500 Subject: [PATCH 2/2] Update requirements.txt --- requirements.txt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/requirements.txt b/requirements.txt index 4af6a3765..492eabe7b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1 @@ -django -gunicorn -django-heroku \ No newline at end of file +pip freeze > requirements.txt