100-Days-Of-Code/Visual Studio Code Projects/day-64-starting-files-top-movies/main.py

41 lines
941 B
Python

from flask import Flask, render_template, redirect, url_for, request
from flask_bootstrap import Bootstrap5
from flask_sqlalchemy import SQLAlchemy
from sqlalchemy.orm import DeclarativeBase, Mapped, mapped_column
from sqlalchemy import Integer, String, Float
from flask_wtf import FlaskForm
from wtforms import StringField, SubmitField
from wtforms.validators import DataRequired
import requests
'''
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__)
app.config['SECRET_KEY'] = '8BYkEfBA6O6donzWlSihBXox7C0sKR6b'
Bootstrap5(app)
# CREATE DB
# CREATE TABLE
@app.route("/")
def home():
return render_template("index.html")
if __name__ == '__main__':
app.run(debug=True)