import os

BASE_DIR = os.path.dirname(os.path.abspath(__name__))

class Config:
    DEBUG = True
    # SQLite3 #### SQLALCHEMY_DATABASE_URI = 'sqlite:///' + os.path.join(BASE_DIR, 'database.sqlite')
    SQLALCHEMY_DATABASE_URI = 'postgresql://thhnotdmgcunwz:415d6dc5b0<EMAIL>:5432/da47drr0meiv51'
    # DEV##### SQLALCHEMY_DATABASE_URI = 'postgresql://postgres:postgres@localhost'
    #database_uri = 'postgresql+psycopg2://{dbuser}:{dbpass}@{dbhost}/{dbname}'.format(dbuser=os.environ['DBUSER'], dbpass=os.environ['DBPASS'], dbhost=os.environ['DBHOST'], dbname=os.environ['DBNAME'])
    # EXAMPLE https://github.com/Azure-Samples/flask-postgresql-app/blob/master/app/app.py
    SQLALCHEMY_TRACK_MODIFICATIONS = False
    JWT_SECRET_KEY = SECRET_KEY = os.urandom(16).hex()#'super-secret'
    #SECURITY_PASSWORD_SALT = os.environ.get("SECURITY_PASSWORD_SALT", '<PASSWORD>68<PASSWORD>86<PASSWORD>0<PASSWORD>0<PASSWORD>')
    #SECURITY_PASSWORD_HASH = 
    #SECURITY_TRACKABLE = True
    JWT_TOKEN_LOCATION = ['headers', 'query_string', 'cookies'] #'headers', 'query_string', 
    JWT_COOKIE_SECURE = False
    JWT_COOKIE_CSRF_PROTECT = False # should be set to TRUE to be more secure and JWT_ACCESS_CSRF_HEADER_NAME uncommented
    #JWT_ACCESS_CSRF_HEADER_NAME = "X-CSRF-TOKEN-ACCESS"
    TRACK_USAGE_COOKIE = True
    #MONGODB_HOST = 'mongodb+srv://Xavries:<EMAIL>/FlaskBlog?retryWrites=true&w=majority'
    #MONGODB_PORT = 27017

import os

BASE_DIR = os.path.dirname(os.path.abspath(__name__))

class Config:
    DEBUG = True
    # SQLite3 #### SQLALCHEMY_DATABASE_URI = 'sqlite:///' + os.path.join(BASE_DIR, 'database.sqlite')
    SQLALCHEMY_DATABASE_URI = 'postgresql://thhnotdmgcunwz:415d6dc5b0<EMAIL>:5432/da47drr0meiv51'
    # DEV##### SQLALCHEMY_DATABASE_URI = 'postgresql://postgres:postgres@localhost'
    #database_uri = 'postgresql+psycopg2://{dbuser}:{dbpass}@{dbhost}/{dbname}'.format(dbuser=os.environ['DBUSER'], dbpass=os.environ['DBPASS'], dbhost=os.environ['DBHOST'], dbname=os.environ['DBNAME'])
    # EXAMPLE https://github.com/Azure-Samples/flask-postgresql-app/blob/master/app/app.py
    SQLALCHEMY_TRACK_MODIFICATIONS = False
    JWT_SECRET_KEY = SECRET_KEY = os.urandom(16).hex()#'super-secret'
    #SECURITY_PASSWORD_SALT = os.environ.get("SECURITY_PASSWORD_SALT", '<PASSWORD>68<PASSWORD>86<PASSWORD>0<PASSWORD>0<PASSWORD>')
    #SECURITY_PASSWORD_HASH = 
    #SECURITY_TRACKABLE = True
    JWT_TOKEN_LOCATION = ['headers', 'query_string', 'cookies'] #'headers', 'query_string', 
    JWT_COOKIE_SECURE = False
    JWT_COOKIE_CSRF_PROTECT = False # should be set to TRUE to be more secure and JWT_ACCESS_CSRF_HEADER_NAME uncommented
    #JWT_ACCESS_CSRF_HEADER_NAME = "X-CSRF-TOKEN-ACCESS"
    TRACK_USAGE_COOKIE = True
    #MONGODB_HOST = 'mongodb+srv://Xavries:<EMAIL>/FlaskBlog?retryWrites=true&w=majority'
    #MONGODB_PORT = 27017

# SQLite3 #### SQLALCHEMY_DATABASE_URI = 'sqlite:///' + os.path.join(BASE_DIR, 'database.sqlite') # DEV##### SQLALCHEMY_DATABASE_URI = 'postgresql://postgres:postgres@localhost' #database_uri = 'postgresql+psycopg2://{dbuser}:{dbpass}@{dbhost}/{dbname}'.format(dbuser=os.environ['DBUSER'], dbpass=os.environ['DBPASS'], dbhost=os.environ['DBHOST'], dbname=os.environ['DBNAME']) # EXAMPLE https://github.com/Azure-Samples/flask-postgresql-app/blob/master/app/app.py #'super-secret' #SECURITY_PASSWORD_SALT = os.environ.get("SECURITY_PASSWORD_SALT", '<PASSWORD>68<PASSWORD>86<PASSWORD>0<PASSWORD>0<PASSWORD>') #SECURITY_PASSWORD_HASH = #SECURITY_TRACKABLE = True #'headers', 'query_string', # should be set to TRUE to be more secure and JWT_ACCESS_CSRF_HEADER_NAME uncommented #JWT_ACCESS_CSRF_HEADER_NAME = "X-CSRF-TOKEN-ACCESS" #MONGODB_HOST = 'mongodb+srv://Xavries:<EMAIL>/FlaskBlog?retryWrites=true&w=majority' #MONGODB_PORT = 27017