flask更新代码,内容不变


#1

在webfaction服务器上部署flask(直接在云端部署的,没有在本地弄过),能够显示hello world,但是却不能更改内容,比如hello world123这种。之前有帖子讨论过在本地的,想问一下在云端服务器的能怎么办吗?
index.py的代码是

import os
import sys
CURRENT_FILE = os.path.abspath(file)
CURRENT_DIR = os.path.dirname(CURRENT_FILE)
PROJECT_DIR = os.path.dirname(CURRENT_DIR)
sys.path.append(PROJECT_DIR + ‘/src/’)
sys.path.append(PROJECT_DIR + ‘/virtualenv/lib/python3.7/site-packages/’)
from myapp0 import server as application

项目文件pyapp0.py是

import os

import dash
import dash_core_components as dcc
import dash_html_components as html

external_stylesheets = [‘https://codepen.io/chriddyp/pen/bWLwgP.css’]

app = dash.Dash(name, external_stylesheets=external_stylesheets)

server = app.server

app.layout = html.Div([
html.H2(‘Hello World’),
dcc.Dropdown(
id=‘dropdown’,
options=[{‘label’: i, ‘value’: i} for i in [‘LA’, ‘NYC’, ‘MTL’]],
value=‘LA’
),
html.Div(id=‘display-value’)
])

@app.callback(dash.dependencies.Output(‘display-value’, ‘children’),
[dash.dependencies.Input(‘dropdown’, ‘value’)])
def display_value(value):
return ‘You have selected “{}”’.format(value)

if name == ‘main’:
app.run_server(debug=True)

debug怎么也弄不出来了
求助哪里错了导致的问题,超级感谢!!


#2

麻烦具体说一下你在服务器上运行程序的方式和修改代码的方式,顺便贴下启动程序后的命令行输出。

请参考置顶帖更新代码块排版,并正确设置帖子分类。