| Homepage | Content | Slides | Video |
Warning
This lesson is under construction. Learn from it at your own risk. If you have any feedback, please fill out our General Feedback Survey.
To take care of the boring stuff.
Use a framework if you are making a cookie cutter application.
If a framework exists for what you’re doing, consider using it.
There are two types of websites: Static and Dynamic.
app.route('/delete', delete_account)
def delete_account():
if username was passed in the query parameters
and password was passed in the query parameters
and the user is in the database
and passed password is correct
database.remove_user(username)
return success
else
return failure
data = {"animal": "Cat", "number": 5}
template.render("You have {{ number }} {{ animal}}s! That's crazy.", data)
You have 5 cats! That's crazy.
Read the documentation on Flask, a simple Python Web-Framework and build a simple “Display the Time in each Timezone” Application.
When a user goes to our website they will see the server’s time and when they go to app-url/<timezone code> they will see the timezone in that area of the world.( http://flask.pocoo.org )