Python Flask Basics Templates and Static Files Flat HTML

i have lost all of the code can someone pls give the code i nedded pls

i accidently lost all the code i don't know how to getr it back

Carlos Mota
Carlos Mota
2,596 Points

Are you on PC or Mac? If you're on PC then right click the folder and go to folder history tab, and hopefully, it saved it there, there are a lot of other ways to be able to recover files. That's just a simple way.

12,964 Points

Hi Millie Jack! Here is the code from file

from flask import Flask

app = Flask(__name__)

def index(name="Treehouse"):
    return "Hello from {}".format(name)

def add(num1, num2):
    return '{} + {} = {}'.format(num1, num2, num1+num2), port=8000, host='')

Hope this helps!

1 Answer

You can simply launch a new workspace from the current video you're watching (or if you are working on a local machine, you can launch a workspace then download the files.)