web/views/formrenderers.py
changeset 2144 51c84d585456
parent 2103 41840b1a2a1a
parent 2093 e3aaf61f8c66
child 2181 94ca417b9b07
equal deleted inserted replaced
2141:0072247db207 2144:51c84d585456
    92         return tags.label(label, **attrs)
    92         return tags.label(label, **attrs)
    93 
    93 
    94     def render_help(self, form, field):
    94     def render_help(self, form, field):
    95         help = []
    95         help = []
    96         descr = field.help
    96         descr = field.help
       
    97         if callable(descr):
       
    98             descr = descr(form)
    97         if descr:
    99         if descr:
    98             help.append('<div class="helper">%s</div>' % self.req._(descr))
   100             help.append('<div class="helper">%s</div>' % self.req._(descr))
    99         example = field.example_format(self.req)
   101         example = field.example_format(self.req)
   100         if example:
   102         if example:
   101             help.append('<div class="helper">(%s: %s)</div>'
   103             help.append('<div class="helper">(%s: %s)</div>'