summaryrefslogtreecommitdiff
path: root/backend/views.py
diff options
context:
space:
mode:
authorroot <root@lalalizard.com>2012-12-24 11:49:32 -0500
committerroot <root@lalalizard.com>2012-12-24 12:06:13 -0500
commitc954e0a792b945a0b0953b6cece68a12313016f9 (patch)
tree011a6ee01defcc7da080a38d84bfb812a816d98d /backend/views.py
parent06e586f7b429eb5c4271e5d5e9f4c7e1914f4527 (diff)
fix videos search
Diffstat (limited to 'backend/views.py')
-rw-r--r--backend/views.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/backend/views.py b/backend/views.py
index 4ea7b2d..f4eed99 100644
--- a/backend/views.py
+++ b/backend/views.py
@@ -1045,7 +1045,9 @@ def api_video_search(request):
limit = int(request.POST['limit'])
if limit > 100:
limit = 100
- videos = SJContent.objects.filter(content_type='video')
+ recenttime = datetime.fromtimestamp(time.time() - 60*60*24*30*3)
+
+ videos = SJContent.objects.filter(content_type='video', datetime__gt=recenttime)
words = {}
videos_by_url = {}
videos_by_id = {}