Prep for Heroku

This commit is contained in:
Aaron Lee 2021-09-09 22:03:20 +08:00
parent 47d685568e
commit f2f280de6b
4 changed files with 26 additions and 6 deletions

1
Procfile Normal file
View file

@ -0,0 +1 @@
web: gunicorn app:app

10
app.py
View file

@ -6,9 +6,9 @@ from sendgrid import SendGridAPIClient
from sendgrid.helpers.mail import Mail
import csv
import os
from dotenv import load_dotenv
from pprint import pprint
load_dotenv()
# from dotenv import load_dotenv
# from pprint import pprint
# load_dotenv()
app = Flask(__name__)
app.config['SECRET_KEY'] = os.environ.get('SECRET_KEY')
@ -202,5 +202,5 @@ def logout():
return redirect('/')
if __name__ == '__main__':
app.run(debug=True)
# if __name__ == '__main__':
# app.run(debug=True)

19
requirements.txt Normal file
View file

@ -0,0 +1,19 @@
# Automatically generated by https://github.com/damnever/pigar.
# Attendance/app.py: 1
Flask == 2.0.1
# Attendance/app.py: 2
# Attendance/test.py: 1
Pyrebase == 3.0.27
# Attendance/app.py: 9
# Attendance/test.py: 3
python_dotenv == 0.19.0
# Attendance/app.py: 4
pytz == 2020.1
# Attendance/app.py: 5,6
sendgrid == 6.7.1
gunicorn == 20.1.0

View file

@ -16,7 +16,7 @@
<div class="container">
<div class="row">
<div class="col-md-4 offset-md-4">
<h1 class="text-center">Login</h1>
<h1 class="text-center">Attendance (β) | Login</h1>
<form action="/" method="post">
<div class="form-group">
<label for="username">Username</label>