Commit 84a8aab3 authored by 李小芳's avatar 李小芳

更新es的配置

parent 78898a43
......@@ -353,12 +353,15 @@ class Diary(models.Model):
delta_30 = datetime.timedelta(days=30)
delta_90 = datetime.timedelta(days=90)
delta_365 = datetime.timedelta(days=365)
if d2 - delta_30 <= create_time:
return 30
elif d2 - delta_90 <= create_time:
return 90
elif d2 - delta_365 <= create_time:
return 365
if create_time:
if d2 - delta_30 <= create_time:
return 30
elif d2 - delta_90 <= create_time:
return 90
elif d2 - delta_365 <= create_time:
return 365
else:
return 1000
else:
return 1000
except:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment