major rework of ythdd.py, new method for setting config in ythdd_globals.py
- slightly modified config, api keys now have the value "CHANGEME" - requirements.txt has new dependency, flask apscheduler - ythdd.py has been reworked, support for argument parsing has been added, code is now split into functions - ythdd_api_v1.py features real uptime as well - ythdd_db.py is no longer dependent on ythdd_globals.py - ythdd_globals.py has a method for setting config and getting it from configfile variable
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
#!/usr/bin/python3
|
||||
from flask_sqlalchemy import SQLAlchemy
|
||||
import toml
|
||||
import ythdd_globals
|
||||
# import ythdd_globals
|
||||
|
||||
database_file = ythdd_globals.config["general"]["db_file_path"]
|
||||
# database_file = ythdd_globals.config["general"]["db_file_path"]
|
||||
global db
|
||||
|
||||
#db = SQLAlchemy()
|
||||
|
||||
def initDB(app):
|
||||
def initDB(app, config):
|
||||
db = SQLAlchemy(app)
|
||||
|
||||
class LocalUsers(db.Model):
|
||||
|
||||
Reference in New Issue
Block a user