fix a pb. with something -- but WHAT was that ? :-/
authorAurelien Campeas <aurelien.campeas@logilab.fr>
Tue, 27 Jan 2009 19:13:54 +0100
changeset 488 2984b3ec7034
parent 487 355356b781d7
child 489 21183fc36b39
fix a pb. with something -- but WHAT was that ? :-/
web/widgets.py
--- a/web/widgets.py	Tue Jan 27 19:12:37 2009 +0100
+++ b/web/widgets.py	Tue Jan 27 19:13:54 2009 +0100
@@ -732,12 +732,13 @@
         formatstr = req.property_value(self.format_key)
         return now().strftime(formatstr)
 
-    def add_localized_infos(self, req):
+    @classmethod
+    def add_localized_infos(cls, req):
         """inserts JS variables defining localized months and days"""
         # import here to avoid dependancy from cubicweb-common to simplejson
         _ = req._
-        monthnames = [_(mname) for mname in self.monthnames]
-        daynames = [_(dname) for dname in self.daynames]
+        monthnames = [_(mname) for mname in cls.monthnames]
+        daynames = [_(dname) for dname in cls.daynames]
         req.html_headers.define_var('MONTHNAMES', monthnames)
         req.html_headers.define_var('DAYNAMES', daynames)