![]() Picture of the day, or POTD, is a featured image displayed daily on the home page of Wikipedia. Now that you have everything set up, you can start writing code for the Picture of the Day viewer. ![]() run () Step 3: Picture of the day viewer route ( "/" ) def hello (): return "Hello World!" if _name_ = "_main_" : APP. When you run it (using flask run or python app.py), it should display "Hello world" at #!/usr/bin/python3 from flask import Flask APP = Flask ( _name_ ). If you have everything successfully installed, place the following script in app.py, inside your project folder: $HOME/picture-of-the-day-viewer/app.py. Step 2: Create a simple Flask application If you don't have pip already, install it from the official Pip website. Pip is a package manager that you can use to install Flask: pip install flask. See the Python beginner's guide for further instructions on installing Python on different operating systems. ![]() You can download the latest Python version from here:
0 Comments
Leave a Reply. |