only pin deleted objects to the bottom in the "hot" sorting (the default)
parent
b418364c58
commit
fade711992
|
@ -28,10 +28,10 @@ def apply_time_filter(t, objects, cls):
|
||||||
|
|
||||||
|
|
||||||
def sort_objects(sort, objects, cls):
|
def sort_objects(sort, objects, cls):
|
||||||
if not (SITE == 'watchpeopledie.tv' and g.v and g.v.id == GTIX_ID):
|
|
||||||
objects = objects.order_by(cls.is_banned, cls.deleted_utc)
|
|
||||||
|
|
||||||
if sort == 'hot':
|
if sort == 'hot':
|
||||||
|
if not (SITE == 'watchpeopledie.tv' and g.v and g.v.id == GTIX_ID):
|
||||||
|
objects = objects.order_by(cls.is_banned, cls.deleted_utc)
|
||||||
|
|
||||||
ti = int(time.time()) + 3600
|
ti = int(time.time()) + 3600
|
||||||
metric = cls.realupvotes + 1
|
metric = cls.realupvotes + 1
|
||||||
if cls.__name__ == "Post": metric += cls.comment_count/5
|
if cls.__name__ == "Post": metric += cls.comment_count/5
|
||||||
|
|
Loading…
Reference in New Issue