Added starting project

This commit is contained in:
Mohammad Rameen 2025-09-12 07:07:11 +05:30
parent 22aa0df1e8
commit fb95d9f10f
6 changed files with 86 additions and 0 deletions

View File

@ -0,0 +1,33 @@
from flask import Flask, render_template, request, redirect, url_for
'''
Red underlines? Install the required packages first:
Open the Terminal in PyCharm (bottom left).
On Windows type:
python -m pip install -r requirements.txt
On MacOS type:
pip3 install -r requirements.txt
This will install the packages from requirements.txt for this project.
'''
app = Flask(__name__)
all_books = []
@app.route('/')
def home():
pass
@app.route("/add")
def add():
pass
if __name__ == "__main__":
app.run(debug=True)

View File

@ -0,0 +1,3 @@
Flask==3.0.0
flask_sqlalchemy==3.1.1
SQLAlchemy==2.0.25

View File

@ -0,0 +1,17 @@
# Tested on Python 3.13.1
# =======================
# In the terminal use:
# pip install -r ./requirements_3.13.txt
#
blinker==1.9.0
click==8.1.8
colorama==0.4.6
Flask==3.1.0
Flask-SQLAlchemy==3.1.1
greenlet==3.1.1
itsdangerous==2.2.0
Jinja2==3.1.5
MarkupSafe==3.0.2
SQLAlchemy==2.0.37
typing_extensions==4.12.2
Werkzeug==3.1.3

View File

@ -0,0 +1,18 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Add Book</title>
</head>
<body>
<form action="" method="POST">
<label>Book Name</label>
<input type="text" />
<label>Book Author</label>
<input type="text" />
<label>Rating</label>
<input type="text" />
<button type="submit">Add Book</button>
</form>
</body>
</html>

View File

@ -0,0 +1,15 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Library</title>
</head>
<body>
<h1>My Library</h1>
<ul>
<li></li>
</ul>
<a href="">Add New Book</a>
</body>
</html>