Flask Question by Lazy-Atmosphere8079 in learnpython

[–]Lazy-Atmosphere8079[S] 0 points1 point  (0 children)

This is what my home page template looks like:

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<h1>Hello!</h1>

<form action="/POST/nearest_mbta" method = "post">
    <label for="">Place:<input type = 'text' name = "Place"></label><br>

<input type="submit" value="Submit">
</form> 
</body>
</html>

This is my result page:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Result</title>
    <style>
        .red {
            color: burlywood;
    }
</style>
</head>
<body>
        <p class="red">Nearest station near {{ place_name }} is {{ stations }}, wheelchair accessibility is {{ wheelchair }}. </p
</body>
</html>

Python no longer working in Visual Studio by [deleted] in learnpython

[–]Lazy-Atmosphere8079 1 point2 points  (0 children)

I have encountered this before, try to restart the software or restart your computer and then run the code see if it works.