mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2024-12-27 09:58:10 +01:00
Improve path
This commit is contained in:
parent
ede8723cc1
commit
496a71c47a
1 changed files with 3 additions and 3 deletions
|
@ -1,6 +1,8 @@
|
|||
#!/usr/bin/python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import os
|
||||
|
||||
from dataclasses import dataclass
|
||||
from sqlalchemy.orm import sessionmaker
|
||||
from sqlalchemy.ext.declarative import declarative_base
|
||||
|
@ -9,10 +11,8 @@ from sqlalchemy import create_engine, Column, Integer, Text
|
|||
from slpkg.configs import Configs
|
||||
|
||||
|
||||
db_path = Configs.db_path
|
||||
database = Configs.database
|
||||
DATABASE_URI = os.path.join(f'sqlite:///{Configs.db_path}', Configs.database)
|
||||
|
||||
DATABASE_URI = f'sqlite:///{db_path}/{database}'
|
||||
engine = create_engine(DATABASE_URI)
|
||||
|
||||
session = sessionmaker(engine)()
|
||||
|
|
Loading…
Reference in a new issue