%!--=================================================== BLOG index page: show recent articles, today's articles, or articles of a specific date. ========================================================--%> <%@inputencoding="ISO-8859-1"%> <%@pagetemplate=TEMPLATE.y%> <%@import=import frog.util, frog%> <%@import=import frog.objects%> <%@import=from frog.storageerrors import StorageError%> <% import logging log=logging.getLogger("Snakelets.logger") user=self.SessionCtx.user storageEngine=self.SessionCtx.storageEngine def readArticlesFromDate(date, count=None): entryids=storageEngine.listBlogEntries(date) entryids.reverse() # descending if count: entryids=entryids[:count] try: return [ frog.objects.BlogEntry.load(storageEngine, date, Id) for Id in entryids ] except StorageError,x: log.error("Error loading articles: "+str(x)) self.abort("cannot load articles") showdate=None arg=self.Request.getArg() if arg=="today": #-------------------- TODAY'S ARTICLES self.write("