Coverage for modules/box__default/settings/models.py: 60%

# Coverage for modules/box__default/settings/models.py : 60%

## 15 statements

Hot-keys on this page

r m x p toggle line displays

j k next/prev highlighted chunk

0 (zero) top of page

1 (one) first highlighted chunk

1 from init import db

2

3

4 class Settings(db.Model):

5 __tablename__ = "settings"

6 setting = db.Column(db.String(100), primary_key=True)

7 value = db.Column(db.String(100))

8

9 def add(self):

10 db.session.add(self)

11

12 def insert(self):

13 db.session.add(self)

14 db.session.commit()

15

16 def update(self):

17 db.session.commit()

18

19 def delete(self):

20 db.session.delete(self)

21 db.session.commit()