gzip = True,
login_url = "/login",
template_path = os.path.join(BASEDIR, "templates"),
+ ui_methods = {
+ "format_month_name" : self.format_month_name,
+ },
ui_modules = {
"Advertisement" : AdvertisementModule,
"DonationBox" : DonationBoxModule,
(r"/post/([A-Za-z0-9_-]+)", PlanetPostingHandler),
(r"/user/([a-z0-9_-]+)", PlanetUserHandler),
(r"/search", PlanetSearchHandler),
+ (r"/year/(\d+)", PlanetYearHandler),
# RSS
(r"/rss", RSSPlanetAllHandler),
def reload(self):
logging.debug("Caught reload signal")
+
+ def format_month_name(self, handler, month):
+ _ = handler.locale.translate
+
+ if month == 1:
+ return _("January")
+ elif month == 2:
+ return _("February")
+ elif month == 3:
+ return _("March")
+ elif month == 4:
+ return _("April")
+ elif month == 5:
+ return _("May")
+ elif month == 6:
+ return _("June")
+ elif month == 7:
+ return _("July")
+ elif month == 8:
+ return _("August")
+ elif month == 9:
+ return _("September")
+ elif month == 10:
+ return _("October")
+ elif month == 11:
+ return _("November")
+ elif month == 12:
+ return _("December")
+
+ return month