def decorateDictionaryWithAPI(object={}): # Settings info object["BLOG_TITLE"] = config.BLOG_TITLE object["BLOG_TAGLINE"] = config.BLOG_TAGLINE object["POSTS_PER_PAGE"] = config.POSTS_PER_PAGE object["THEME_NAME"] = request.themeName # Path info object["THEME_PATH"] = themeservice.getFullThemePath(themeName=request.themeName) object["THEME_STATIC_PATH"] = themeservice.getThemeStaticPath(themeName=request.themeName) # Date/time methods and constants object["formatDateTime"] = dthelper.formatDateTime object["formatDate"] = dthelper.formatDate object["formatTime"] = dthelper.formatTime object["REST_DATE_FORMAT"] = dthelper.REST_DATE_FORMAT object["REST_DATETIME_FORMAT"] = dthelper.REST_DATETIME_FORMAT object["US_DATE_FORMAT"] = dthelper.US_DATE_FORMAT object["US_DATETIME_FORMAT"] = dthelper.US_DATETIME_FORMAT object["US_TIME_FORMAT"] = dthelper.US_TIME_FORMAT # Tag methods object["getPostTags"] = postservice.getPostTags return object
def serveStaticThemeResources(filepath): return static_file(filepath, root=themeservice.getThemeStaticPath(themeName=request.themeName))