aboutsummaryrefslogtreecommitdiff
path: root/database/models.py
blob: c731a08391a367f611587642f835a91a0e1cd526 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
from peewee import Model, CharField, SqliteDatabase

import config

db = SqliteDatabase(config.DATABASE)
db.connect()

class Page(Model):
    """
    Page of a website
    """
    url = CharField()
    title = CharField(null=True)
    content = CharField(null=True)

    class Meta:
        database = db