mirror of
https://github.com/gmbrax/Pilgrim.git
synced 2026-11-10 01:20:16 +00:00
Added the Services layer to the code to do the database operation
This commit is contained in:
parent
0a9c2952ec
commit
8ad57b548f
@@ -1,4 +1,5 @@
|
||||
from pilgrim.database import Database
|
||||
from pilgrim.service.servicemanager import ServiceManager
|
||||
|
||||
|
||||
class Application:
|
||||
@@ -7,3 +8,9 @@ class Application:
|
||||
|
||||
def run(self):
|
||||
self.database.create()
|
||||
|
||||
def get_service_manager(self):
|
||||
session = self.database.session()
|
||||
session_manager = ServiceManager()
|
||||
session_manager.set_session(session)
|
||||
return session_manager
|
||||
Reference in New Issue
Block a user