Modified:
trunk/index.py
trunk/index.yaml
Log:
browse functionality
Modified: trunk/index.py
==============================================================================
--- trunk/index.py (original)
+++ trunk/index.py Sat Feb 14 14:17:12 2009
@@ -2,6 +2,7 @@
import os
import base64
import sha
+import datetime
from google.appengine.ext.webapp import template
from google.appengine.ext import webapp
@@ -62,7 +63,8 @@
if browse_date:
- recent = LogoProgram.all().filter('date =',
browse_date).order('-date').fetch(5)
+ browse_date =
datetime.datetime.strptime(browse_date,"%Y-%m-%dT%H:%M:%S")
+ recent = LogoProgram.all().filter('date <',
browse_date).order('-date').fetch(5)
if recent:
last_date = recent[-1].date
else:
@@ -83,7 +85,7 @@
if recent:
values['recent'] = recent
if last_date:
- values['last_date'] = last_date
+ values['last_date'] =
last_date.strftime("%Y-%m-%dT%H:%M:%S")
page =
os.path.join(os.path.dirname(__file__), 'index.html.tmpl')
self.response.out.write(template.render(page, values))
Modified: trunk/index.yaml
==============================================================================
--- trunk/index.yaml (original)
+++ trunk/index.yaml Sat Feb 14 14:17:12 2009
@@ -10,7 +10,7 @@
# automatically uploaded to the admin console when you next deploy
# your application using appcfg.py.
-# Used 5 times in query history.
+# Used 17 times in query history.
- kind: LogoProgram
properties:
- name: date