diff --git a/BDSM/__init__.py b/BDSM/__init__.py index 0c5390d..a121905 100644 --- a/BDSM/__init__.py +++ b/BDSM/__init__.py @@ -14,7 +14,9 @@ else: app = Flask(__name__) app.config['SECRET_KEY'] = os.getenv('SECRET_KEY', 'dev') -app.config['SQLALCHEMY_DATABASE_URI'] = prefix + os.path.join(os.path.dirname(app.root_path), os.getenv('DATABASE_FILE', 'data.db')) +app.config['SQLALCHEMY_DATABASE_URI'] = prefix + os.path.join(os.path.dirname(app.root_path), + "data", + os.getenv('DATABASE_FILE', 'data.db')) app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False db = SQLAlchemy(app) diff --git a/BDSM/toot.py b/BDSM/toot.py index 4e0e49e..b4217a1 100644 --- a/BDSM/toot.py +++ b/BDSM/toot.py @@ -12,13 +12,13 @@ def app_register(url): Mastodon.create_app( 'pyBDSM', api_base_url = url, - to_file = 'pyBDSM_clientcred.secret', + to_file = 'data/pyBDSM_clientcred.secret', scopes=["read"] ) def app_login(url): mastodon = Mastodon( - client_id='pyBDSM_clientcred.secret', + client_id='data/pyBDSM_clientcred.secret', access_token='user.secret', api_base_url=url ) diff --git a/data/.gitignore b/data/.gitignore new file mode 100644 index 0000000..dbb87a6 --- /dev/null +++ b/data/.gitignore @@ -0,0 +1,12 @@ +.DS_Store +.idea +*.log +tmp/ + +*.py[cod] +*.egg +build +htmlcov + +*.secret +*.db