Skip to content

Commit

Permalink
UI fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
dsinghnegi committed Nov 8, 2019
1 parent a0f2457 commit 1169bc9
Show file tree
Hide file tree
Showing 9 changed files with 69 additions and 4 deletions.
7 changes: 7 additions & 0 deletions .slugignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
*.db
*.log
*.pyc
.git/
*/chest_model
*/skin_cancer_model_model

1 change: 1 addition & 0 deletions Procfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
web: gunicorn manage:app
22 changes: 22 additions & 0 deletions app.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name": "Start on Heroku: Python",
"description": "A barebones Python app, which can easily be deployed to Heroku.",
"image": "heroku/python",
"repository": "https://github.com/dsinghnegi/medical-diagnosis-webapp",
"keywords": ["python", "flask" ],
"addons": [ "heroku-postgresql" ],
"env": {
"SECRET_KEY": {
"description": "The secret key for the flask application.",
"generator": "secret"
}
},
"environments": {
"test": {
"scripts": {
"test-setup": "python manage.py initdb",
"test": "python manage.py runserver"
}
}
}
}
1 change: 0 additions & 1 deletion app/config.py

This file was deleted.

34 changes: 34 additions & 0 deletions app/config.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import logging

from app.config_common import *


# DEBUG has to be to False in a production environment for security reasons
DEBUG = False

# Secret key for generating tokens
SECRET_KEY = 'houdini'

# Admin credentials
ADMIN_CREDENTIALS = ('admin', 'pa$$word')

# Database choice
SQLALCHEMY_DATABASE_URI = 'sqlite:///app.db'
SQLALCHEMY_TRACK_MODIFICATIONS = True

# Configuration of a Gmail account for sending mails
MAIL_SERVER = 'smtp.googlemail.com'
MAIL_PORT = 465
MAIL_USE_TLS = False
MAIL_USE_SSL = True
MAIL_USERNAME = 'flask.boilerplate'
MAIL_PASSWORD = 'flaskboilerplate123'
ADMINS = ['[email protected]']

# Number of times a password is hashed
BCRYPT_LOG_ROUNDS = 12

LOG_LEVEL = logging.INFO
LOG_FILENAME = 'activity.log'
LOG_MAXBYTES = 1024
LOG_BACKUPS = 2
1 change: 1 addition & 0 deletions app/config_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,5 @@
ADMINS = ['[email protected]']

# Number of times a password is hashed
MAX_CONTENT_LENGTH= 10 * 1024 * 1024
BCRYPT_LOG_ROUNDS = 12
2 changes: 1 addition & 1 deletion app/config_prod.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
ADMIN_CREDENTIALS = ('admin', 'pa$$word')

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

# Configuration of a Gmail account for sending mails
Expand Down
2 changes: 1 addition & 1 deletion app/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def password(self, plaintext):
self._password = bcrypt.generate_password_hash(plaintext)

def check_password(self, plaintext):
return bcrypt.check_password_hash(self.password, plaintext)
return self.password==plaintext

def get_id(self):
return self.email
Expand Down
2 changes: 1 addition & 1 deletion app/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ <h1 class="mbr-section-title mbr-fonts-style mbr-semibold display-1">{{ title }}
<div class="container pt-md-5 mt-md-5">
<div class="row">
<div class="col p-md-3" style="background-color:#DCD5DF;">
<h2>Trail</h2>
<h2>Starter</h2>
<p>• 10 USD per 10000 request</p>
<p>• Email support</p>
<p>• Instant Delivery</p>
Expand Down
1 change: 1 addition & 0 deletions var.env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FLASK_CONFIG=heroku

0 comments on commit 1169bc9

Please sign in to comment.