SHARE
TWEET

cust renderer

a guest Dec 28th, 2011 37 Never
  1. class HorizRadioRenderer(forms.RadioSelect.renderer):
  2.     """ this overrides widget method to put radio buttons horizontally
  3.        instead of vertically.
  4.    """
  5.     def render(self):
  6.             """Outputs radios"""
  7.             return mark_safe(u'\n'.join([u'%s\n' % w for w in self]))
RAW Paste Data
Top