Changes for page How to serve a webpage using python flask
Last modified by Leon Poon on 2021/03/23 13:17
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -1,8 +1,9 @@ 1 -First, [[set up a virtualenv>> url:https://wiki.codepowered.com/wiki/How_to_Create_a_VirtualEnv]].1 +First, [[set up a virtualenv>>doc:Main.How to Create a VirtualEnv.WebHome]]. 2 2 3 -[[In the virtualenv, install flask>> url:https://wiki.codepowered.com/wiki/How_to_add_libraries_to_a_virtualenv]], then try out this .py file.3 +[[In the virtualenv, install flask>>doc:Computing Newbies.Python Newbies.How to add libraries to a virtualenv.WebHome]], then try out this .py file. 4 4 5 -{{{from flask import Flask 5 +{{code language="python"}} 6 +from flask import Flask 6 6 7 7 app = Flask(__name__) 8 8 ... ... @@ -11,8 +11,8 @@ 11 11 return 'Hi' 12 12 13 13 app.run() 14 -}} }15 +{{/code}} 15 15 16 -Run this script [[in the virtualenv>> url:https://wiki.codepowered.com/wiki/How_to_Run_a_Python_Script_in_a_VirtualEnv]]. It will not exit.17 +Run this script [[in the virtualenv>>doc:Main.How to Run a Python Script in a VirtualEnv.WebHome]]. It will not exit. 17 17 18 18 Now you should be able to access [[http:~~/~~/localhost:5000/>>url:http://localhost:5000/]] in your web browser.