cust renderer

a guest Dec 28th, 2011 42 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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
Want to get better at Python?
Learn to code Python in 2017
Pastebin PRO Summer Special!
Get 40% OFF on Pastebin PRO accounts!