relative index is not useful. Peewee has paging capability built-in
This commit is contained in:
parent
7b5c0822ff
commit
2053e116a4
2 changed files with 6 additions and 10 deletions
|
|
@ -3,8 +3,8 @@
|
|||
|
||||
from peewee import Model
|
||||
from peewee import CharField
|
||||
from peewee import TextField
|
||||
from peewee import DateTimeField
|
||||
from peewee import IntegerField
|
||||
from peewee import ForeignKeyField
|
||||
from app.models.site import Site
|
||||
from app.services.database import get_db
|
||||
|
|
@ -12,12 +12,11 @@ from app.services.database import get_db
|
|||
|
||||
class Comment(Model):
|
||||
url = CharField()
|
||||
date = DateTimeField()
|
||||
rel_index = IntegerField()
|
||||
published = DateTimeField()
|
||||
author_name = CharField()
|
||||
author_email = CharField(default='')
|
||||
author_site = CharField()
|
||||
content = CharField()
|
||||
author_site = CharField(default='')
|
||||
content = TextField()
|
||||
site = ForeignKeyField(Site, related_name='site')
|
||||
|
||||
class Meta:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue