mirror of
https://github.com/gmbrax/Pilgrim.git
synced 2026-11-10 02:30:18 +00:00
Add the tomli library and create the config_manager.py to manage the configuration file and also add the dependency injection on the ui.py via the Application class
This commit is contained in:
parent
0adb230dd7
commit
3843be6e13
@@ -1,17 +1,18 @@
|
||||
from pilgrim.database import Database
|
||||
from pilgrim.service.servicemanager import ServiceManager
|
||||
from pilgrim.ui.ui import UIApp
|
||||
from pilgrim.utils import DirectoryManager
|
||||
from pilgrim.utils import DirectoryManager, ConfigManager
|
||||
|
||||
|
||||
class Application:
|
||||
def __init__(self):
|
||||
self.config_dir = DirectoryManager.get_config_directory()
|
||||
self.database = Database()
|
||||
self.config_manager = ConfigManager()
|
||||
session = self.database.session()
|
||||
session_manager = ServiceManager()
|
||||
session_manager.set_session(session)
|
||||
self.ui = UIApp(session_manager)
|
||||
self.ui = UIApp(session_manager,self.config_manager)
|
||||
|
||||
def run(self):
|
||||
self.database.create()
|
||||
|
||||
Reference in New Issue
Block a user