forked from 00dani/lemoncurry
Hide likes and replies from the homepage
This commit is contained in:
parent
28e4a71cae
commit
adb302ebe3
2 changed files with 10 additions and 3 deletions
|
@ -1,8 +1,9 @@
|
|||
class Entry:
|
||||
def __init__(self, id, plural, icon, slug=False):
|
||||
def __init__(self, id, plural, icon, on_home=True, slug=False):
|
||||
self.id = id
|
||||
self.plural = plural
|
||||
self.icon = icon
|
||||
self.on_home = on_home
|
||||
self.slug = slug
|
||||
|
||||
@property
|
||||
|
@ -46,12 +47,14 @@ Reply = Entry(
|
|||
id='reply',
|
||||
icon='fa fa-comment',
|
||||
plural='replies',
|
||||
on_home=False,
|
||||
)
|
||||
|
||||
Like = Entry(
|
||||
id='like',
|
||||
icon='fa fa-heart',
|
||||
plural='likes',
|
||||
on_home=False,
|
||||
)
|
||||
|
||||
Repost = Entry(
|
||||
|
@ -61,5 +64,6 @@ Repost = Entry(
|
|||
)
|
||||
|
||||
all = (Note, Article, Photo, Reply, Like, Repost)
|
||||
on_home = (k.id for k in all if k.on_home)
|
||||
from_id = {k.id: k for k in all}
|
||||
from_plural = {k.plural: k for k in all}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue