Move plotly import to top of file.
This commit is contained in:
1 parent
d55b711156
commit
8499c457fd
1 file changed
+2
-3
+2
-3
@@ -48,6 +48,8 @@ from flask import Flask, request, render_template
|
|||||||
import time
|
import time
|
||||||
import datetime
|
import datetime
|
||||||
import arrow
|
import arrow
|
||||||
|
import plotly.plotly as py
|
||||||
|
from plotly.graph_objs import *
|
||||||
|
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
app.debug = True # Make this False if you are no longer debugging
|
app.debug = True # Make this False if you are no longer debugging
|
||||||
@@ -143,9 +145,6 @@ def get_records():
|
|||||||
|
|
||||||
@app.route("/to_plotly", methods=['GET']) #This method will send the data to ploty.
|
@app.route("/to_plotly", methods=['GET']) #This method will send the data to ploty.
|
||||||
def to_plotly():
|
def to_plotly():
|
||||||
import plotly.plotly as py
|
|
||||||
from plotly.graph_objs import *
|
|
||||||
|
|
||||||
temperatures, humidities, timezone, from_date_str, to_date_str = get_records()
|
temperatures, humidities, timezone, from_date_str, to_date_str = get_records()
|
||||||
|
|
||||||
# Create new record tables so that datetimes are adjusted back to the user browser's time zone.
|
# Create new record tables so that datetimes are adjusted back to the user browser's time zone.
|
||||||
|
|||||||
Reference in new issue
Block a user