MoinMoin Logo
  • Comments
  • Immutable Page
  • Menu
    • Navigation
    • RecentChanges
    • FindPage
    • Local Site Map
    • Help
    • HelpContents
    • HelpOnMoinWikiSyntax
    • Display
    • Attachments
    • Info
    • Raw Text
    • Print View
    • Edit
    • Load
    • Save
  • Login

Navigation

  • Start
  • Sitemap

Upload page content

You can upload content for the page named below. If you change the page name, you can also upload content for another page. If the page name is empty, we derive the page name from the file name.

File to load page content from
Page name
Comment

  • Python
  • Flask

Flask

  • Micro web development framework
  • https://flask.palletsprojects.com/en/2.0.x/

  • Flask depends on the Jinja template engine and the Werkzeug WSGI toolkit.

Example

   1 cd ~/tmp
   2 mkdir flaskproject
   3 cd flaskproject
   4 sudo apt install python3-venv
   5 python3 -m venv virtenv
   6 . virtenv/bin/activate
   7 pip install Flask
   8 find . virtenv/
  • nano flaskproj.py

   1 from flask import Flask
   2 
   3 app = Flask(__name__)
   4 
   5 @app.route("/")
   6 def hello_world():
   7     return "<p>Hello World from Flask!</p>"

   1 export FLASK_APP=flaskproj
   2 flask run  --host=0.0.0.0
   3 # http://127.0.0.1:5000/
   4 #  if the file is named app.py or wsgi.py, you don’t have to set the FLASK_APP environment
   5 
  • MoinMoin Powered
  • Python Powered
  • GPL licensed
  • Valid HTML 4.01