Flask app always gives 404 error

I have a simple application ..It is a web app booking system 

The pages are not loading... sometimes they load and sometimes not..I tried everything and I run from cmd and from terminal and from inside pycharm all same result the index page is loading after days the new.html loads and now nothing is loading...I am stuck for days and in need of urgent help

new.html

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link href="/static/css/new.css" rel="stylesheet">
<title>New user login Form</title>
</head>
<body>
<h3>Please register</h3>
<form action="booking.html" method=POST>
<div>
<label>Name</label>
<input type="text" name="name">
<br/>
<label>Username</label>
<input type="text" name="username">
<br/>
</div>
<div>
<label>Password</label>
<input type="password" name="password">
<br/>
<label>Mobile</label>
<input type="tel" name="mobile">
<br/>
</div>
<div>
<label>Email</label>
<input type="email" name="email">
<input type="submit" value="login">
<br/>
</div>


</form>
</body>
</html>

index.html

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link href="/static/css/index.css" rel="stylesheet">
<title>Flamingo Billiards Booking System</title>
</head>
<body>
<div id="main">
<div id="left">
<div id="logo">
<img src="/static/images/logo-social.png" alt="logo">
<h3> Login or Signup</h3>
</div>
<div id="btn">
<a href= "new.html" target="_self"><button >New User</button></a>

<a href= "login.html" target="_self"><button >Login</button></a>
</div>
</div>
<div id="info">
<h2>Flamingo Billiards</h2>
<p>24th street located in central of Dubai<br>
We open our doors daily from 10:00 to 23:00<br>
Except Fridays from 14:00 to 23:00<br>
Mondays are our Holiday</p>
</div>

</div>
</body>
</html>

app.py


from flask import Flask, render_template, request
import sqlite3

app = Flask(__name__)
app.url_map.strict_slashes = False



@app.route('/')
def index():
return render_template('index.html')


@app.route('/new/')
def loginnew():
return render_template("new.html")


def db_connection():
conn = sqlite3.connect("flamingo.sqlite")
print("connection established")
return conn



if __name__ == '__main__':
app.secret_key = 'mysecret'
app.run(debug=True)
#app.run(debug=True)

Please sign in to leave a comment.