-
Notifications
You must be signed in to change notification settings - Fork 59
Open
Description
Hello,
In order to avoid declaring an init method inside all services, with often the same things (db, current_user) I use an abstract class that UserService (for example) inherits:
class AbstractService(ABC):
def __init__(self,):
self.config = config
self.session = self.config.get_db()
class UsersService(AbstractService):
def get_users():
**self.session.query....**
But this doesn't work, as the self.session is never set. But if I create a init in UsersService and call the super.init(), then it works.
Is there a way to fix that ?
THank you for the help and the great framework.
Metadata
Metadata
Assignees
Labels
No labels