helpers.py
changeset 131 67f5d2fdca1d
parent 115 751e3fcd11d2
child 132 0e857c4a67de
equal deleted inserted replaced
130:4212fd69d671 131:67f5d2fdca1d
     5 import datetime
     5 import datetime
     6 import calendar as _calendar
     6 import calendar as _calendar
     7 
     7 
     8 import qmsk.web.helpers
     8 import qmsk.web.helpers
     9 
     9 
    10 import preferences, urls, config
    10 import preferences, urls, config, version
    11 
    11 
    12 class Helpers (qmsk.web.helpers.Helpers) :
    12 class Helpers (qmsk.web.helpers.Helpers) :
    13     """
    13     """
    14         Our set of helpers, inheriting from base helpers
    14         Our set of helpers, inheriting from base helpers
    15     """
    15     """
    20     # reference to calendar instance
    20     # reference to calendar instance
    21     calendar = _calendar.Calendar()
    21     calendar = _calendar.Calendar()
    22 
    22 
    23     # list of (month_num, month_name) for the months in the year
    23     # list of (month_num, month_name) for the months in the year
    24     months = list(enumerate(_calendar.month_name))[1:]
    24     months = list(enumerate(_calendar.month_name))[1:]
       
    25 
       
    26     
       
    27     def version_link (self) :
       
    28         """
       
    29             Returns a <a href> representing this version of the software
       
    30         """
       
    31 
       
    32         return version.version_link_hg(config.HGWEB_URL, config.HG_WC_PATH)
    25 
    33 
    26     def tz_name (self, tz) :
    34     def tz_name (self, tz) :
    27         """
    35         """
    28             Returns a string describing the given timezone
    36             Returns a string describing the given timezone
    29         """
    37         """