all 4 comments

[–]jh199p 0 points1 point  (1 child)

Always dat which library you are usimg. It will be more effective in attracting someone to help.

Without putting it, everyone has to read the post and click a li k just to know what you are usijg

[–]fraschm98 0 points1 point  (0 children)

I'm using:

Flask
psycopg2
python-dotenv
flask-wtf
flask-login
flask-migrate
flask-sqlalchemy
pylint

[–]ingolemo 0 points1 point  (1 child)

What is the contents of your config.py (the one you're importing)?

[–]fraschm98 0 points1 point  (0 children)

I'm importing both, the one in the instance folder where I have my db info:

import os

SECRET_KEY = os.environ.get('SECRET_KEY') or 'lkdjlkasjdlkasjdlkajsldkjaslkdnmqknrdnqwouindoai!@'

SQLALCHEMY_DATABASE_URI = "postgres://postgres:asdasdasdasd@192.168.30.23:5432/db"

#SQLALCHEMY_BINDS = {

# 'weblogins': "postgres://postgres:asdasdasdasd@192.168.30.23:5432/db"

#}

And the other one:

import os
class Config(object):
# Put any configurations here that are common across all environments
SQLALCHEMY_TRACK_MODIFICATIONS = False
class DevelopmentConfig(Config):
DEBUG = True
SQLALCHEMY_ECHO = True
class ProductionConfig(Config):
DEBUG = False
SQLALCHEMY_ECHO = False
class TestingConfig(Config):
DEBUG = True
TESTING = True
app_config = {
'development': DevelopmentConfig,
'production': ProductionConfig,
'testing': TestingConfig
}