1
0
Fork 0
This repository has been archived on 2024-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
Kfet-depreciated/config.py

12 lines
400 B
Python

import os
basedir = os.path.abspath(os.path.dirname(__file__))
if not os.path.isfile("key.ini"):
open("key.ini", "w").write(str(os.urandom(24)))
KEY = open("key.ini").readline().replace("\n", "")
class Config(object):
SECRET_KEY = KEY
SQLALCHEMY_DATABASE_URI = os.environ.get("DATABASE_URL") or "sqlite:///" + os.path.join(basedir, "app.db")
SQLALCHEMY_TRACK_MODIFICATIONS = False