Revize aff74b5a
Přidáno uživatelem Jan Pašek před asi 4 roky(ů)
src/config/configuration.py | ||
---|---|---|
1 |
from injector import singleton |
|
2 |
|
|
3 |
|
|
4 |
class Configuration: |
|
5 |
|
|
6 |
def __init__(self, connection_string): |
|
7 |
self.connection_string = connection_string |
|
8 |
|
|
9 |
|
|
10 |
def configure_default(binder): |
|
11 |
configuration = Configuration("db/database_sqlite.db") |
|
12 |
binder.bind(Configuration, to=configuration, scope=singleton) |
Také k dispozici: Unified diff
Re #8569 Added configuration class and loading it using injector