Show More
@@ -1,4 +1,4 b'' | |||||
1 | from datetime import datetime, timedelta |
|
1 | from datetime import datetime, timedelta, date | |
2 | from datetime import time as dtime |
|
2 | from datetime import time as dtime | |
3 | import os |
|
3 | import os | |
4 | from random import random |
|
4 | from random import random | |
@@ -175,7 +175,7 b' class PostManager(models.Manager):' | |||||
175 | Get average count of posts per day for the last 7 days |
|
175 | Get average count of posts per day for the last 7 days | |
176 | """ |
|
176 | """ | |
177 |
|
177 | |||
178 |
today = date |
|
178 | today = date.today() | |
179 | ppd = cache.get(CACHE_KEY_PPD + str(today)) |
|
179 | ppd = cache.get(CACHE_KEY_PPD + str(today)) | |
180 | if ppd: |
|
180 | if ppd: | |
181 | return ppd |
|
181 | return ppd |
General Comments 0
You need to be logged in to leave comments.
Login now