Created login functinality
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
from abc import ABC, abstractmethod
|
||||
from typing import Mapping, Any
|
||||
import sqlite3
|
||||
|
||||
class DatabaseController(ABC):
|
||||
@@ -14,6 +15,12 @@ class DatabaseController(ABC):
|
||||
self._conn.close()
|
||||
print(e)
|
||||
|
||||
def new_instance(self, of: type, with_fields: Mapping[str, Any]):
|
||||
obj = of.__new__(of)
|
||||
for attr, value in with_fields.items():
|
||||
setattr(obj, attr, value)
|
||||
return obj
|
||||
|
||||
@abstractmethod
|
||||
def create(self):
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user