This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # src/models/UserModel.py | |
| ##################### | |
| # existing code remain # | |
| ###################### | |
| from ..app import bcrypt # add this line | |
| class UserModel(db.Model): | |
| """ | |
| User Model | |
| """ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # src/models/UserModel.py | |
| from marshmallow import fields, Schema | |
| import datetime | |
| from . import db | |
| class UserModel(db.Model): | |
| """ | |
| User Model | |
| """ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # /run.py | |
| import os | |
| from src.app import create_app | |
| if __name__ == '__main__': | |
| env_name = os.getenv('FLASK_ENV') | |
| app = create_app(env_name) | |
| # run app | |
| app.run() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #src/app.py | |
| from flask import Flask | |
| from .config import app_config | |
| def create_app(env_name): | |
| """ | |
| Create app | |
| """ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # /src/config.py | |
| import os | |
| class Development(object): | |
| """ | |
| Development environment configuration | |
| """ | |
| DEBUG = True | |
| TESTING = False |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [[source]] | |
| url = "https://pypi.org/simple" | |
| verify_ssl = true | |
| name = "pypi" | |
| [packages] | |
| flask = "*" | |
| flask-sqlalchemy = "*" | |
| "psycopg2" = "*" | |
| flask-migrate = "*" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // src/test/java/GoogleSearchTest.java | |
| import base.SetupTestDriver; | |
| import org.openqa.selenium.By; | |
| import org.openqa.selenium.WebDriver; | |
| import org.openqa.selenium.WebElement; | |
| import org.testng.Assert; | |
| import org.testng.annotations.*; | |
| import java.net.MalformedURLException; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #src/shared/Authentication | |
| import jwt | |
| import os | |
| import datetime | |
| from flask import json | |
| from ..models.UserModel import UserModel | |
| class Auth(): | |
| """ |
NewerOlder