forked from MarseyWorld/MarseyWorld
increase dropoff exponenet to 1.4
parent
bb6d38b3e7
commit
c7f606baa9
|
@ -29,7 +29,7 @@ def sort_objects(sort, objects, cls):
|
||||||
ti = int(time.time()) + 3600
|
ti = int(time.time()) + 3600
|
||||||
metric = cls.realupvotes
|
metric = cls.realupvotes
|
||||||
if cls.__name__ == "Post": metric += cls.comment_count/5
|
if cls.__name__ == "Post": metric += cls.comment_count/5
|
||||||
return objects.order_by(-1000000*(metric + 1)/(func.power(((ti - cls.created_utc)/1000), 1.35)), cls.created_utc.desc())
|
return objects.order_by(-1000000*(metric + 1)/(func.power(((ti - cls.created_utc)/1000), 1.4)), cls.created_utc.desc())
|
||||||
elif sort == "views" and cls.__name__ == "Post":
|
elif sort == "views" and cls.__name__ == "Post":
|
||||||
return objects.order_by(cls.views.desc(), cls.created_utc.desc())
|
return objects.order_by(cls.views.desc(), cls.created_utc.desc())
|
||||||
elif sort == "bump" and cls.__name__ == "Post":
|
elif sort == "bump" and cls.__name__ == "Post":
|
||||||
|
|
Loading…
Reference in New Issue