déplacement url de connexion de la base de donnée
This commit is contained in:
parent
77c5ffbdcf
commit
eb02269bbb
2 changed files with 5 additions and 2 deletions
|
@ -1,8 +1,8 @@
|
|||
import sqlite3
|
||||
|
||||
class Database:
|
||||
def __init__(self):
|
||||
self.connexion = self.createConnection(r"src/db/bot.sqlite3")
|
||||
def __init__(self, urlDatabase):
|
||||
self.connexion = self.createConnection(urlDatabase)
|
||||
|
||||
def createConnection(self, path):
|
||||
"""Connexion à une base de donnée SQLite"""
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
from utils.db import Database
|
||||
|
||||
class Reminder(Database):
|
||||
def __init__(self):
|
||||
super().__init__(r"src/db/bot.sqlite3")
|
||||
|
||||
def creationTable(self):
|
||||
"""Créer la table qui stocker les reminders"""
|
||||
requete = """
|
||||
|
|
Reference in a new issue