Skip to content

Commit 1169bc9

Browse files
committed
UI fixes
1 parent a0f2457 commit 1169bc9

File tree

9 files changed

+69
-4
lines changed

9 files changed

+69
-4
lines changed

.slugignore

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
*.db
2+
*.log
3+
*.pyc
4+
.git/
5+
*/chest_model
6+
*/skin_cancer_model_model
7+

Procfile

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
web: gunicorn manage:app

app.json

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"name": "Start on Heroku: Python",
3+
"description": "A barebones Python app, which can easily be deployed to Heroku.",
4+
"image": "heroku/python",
5+
"repository": "https://github.com/dsinghnegi/medical-diagnosis-webapp",
6+
"keywords": ["python", "flask" ],
7+
"addons": [ "heroku-postgresql" ],
8+
"env": {
9+
"SECRET_KEY": {
10+
"description": "The secret key for the flask application.",
11+
"generator": "secret"
12+
}
13+
},
14+
"environments": {
15+
"test": {
16+
"scripts": {
17+
"test-setup": "python manage.py initdb",
18+
"test": "python manage.py runserver"
19+
}
20+
}
21+
}
22+
}

app/config.py

-1
This file was deleted.

app/config.py

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
import logging
2+
3+
from app.config_common import *
4+
5+
6+
# DEBUG has to be to False in a production environment for security reasons
7+
DEBUG = False
8+
9+
# Secret key for generating tokens
10+
SECRET_KEY = 'houdini'
11+
12+
# Admin credentials
13+
ADMIN_CREDENTIALS = ('admin', 'pa$$word')
14+
15+
# Database choice
16+
SQLALCHEMY_DATABASE_URI = 'sqlite:///app.db'
17+
SQLALCHEMY_TRACK_MODIFICATIONS = True
18+
19+
# Configuration of a Gmail account for sending mails
20+
MAIL_SERVER = 'smtp.googlemail.com'
21+
MAIL_PORT = 465
22+
MAIL_USE_TLS = False
23+
MAIL_USE_SSL = True
24+
MAIL_USERNAME = 'flask.boilerplate'
25+
MAIL_PASSWORD = 'flaskboilerplate123'
26+
ADMINS = ['[email protected]']
27+
28+
# Number of times a password is hashed
29+
BCRYPT_LOG_ROUNDS = 12
30+
31+
LOG_LEVEL = logging.INFO
32+
LOG_FILENAME = 'activity.log'
33+
LOG_MAXBYTES = 1024
34+
LOG_BACKUPS = 2

app/config_common.py

+1
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,5 @@
2020
ADMINS = ['[email protected]']
2121

2222
# Number of times a password is hashed
23+
MAX_CONTENT_LENGTH= 10 * 1024 * 1024
2324
BCRYPT_LOG_ROUNDS = 12

app/config_prod.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
ADMIN_CREDENTIALS = ('admin', 'pa$$word')
1414

1515
# Database choice
16-
SQLALCHEMY_DATABASE_URI = 'sqlite:///app.db'
16+
SQLALCHEMY_DATABASE_URI = 'postgres://ypksxsbmzezghb:c51873c042b48b3d1c8d6a5313819386bd1e16ce5127cfbe99aedda7d9f9c774@ec2-54-83-13-145.compute-1.amazonaws.com:5432/d8s4a71o7jdk39'
1717
SQLALCHEMY_TRACK_MODIFICATIONS = True
1818

1919
# Configuration of a Gmail account for sending mails

app/models.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def password(self, plaintext):
3131
self._password = bcrypt.generate_password_hash(plaintext)
3232

3333
def check_password(self, plaintext):
34-
return bcrypt.check_password_hash(self.password, plaintext)
34+
return self.password==plaintext
3535

3636
def get_id(self):
3737
return self.email

app/templates/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ <h1 class="mbr-section-title mbr-fonts-style mbr-semibold display-1">{{ title }}
3333
<div class="container pt-md-5 mt-md-5">
3434
<div class="row">
3535
<div class="col p-md-3" style="background-color:#DCD5DF;">
36-
<h2>Trail</h2>
36+
<h2>Starter</h2>
3737
<p>• 10 USD per 10000 request</p>
3838
<p>• Email support</p>
3939
<p>• Instant Delivery</p>

var.env

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
FLASK_CONFIG=heroku

0 commit comments

Comments
 (0)