Permalink
Browse files

Oops.. forgot adding a module.

  • Loading branch information...
1 parent 59cc85d commit b3885076221291749ee737706b42a5d19d2a7d65 @seldon seldon committed May 7, 2012
Showing with 13 additions and 0 deletions.
  1. +13 −0 open_municipio/om_utils/widgets.py
@@ -0,0 +1,13 @@
+from django import forms
+from django.utils.safestring import mark_safe
+
+
+
+class HorizontalRadioRenderer(forms.RadioSelect.renderer):
+ """
+ A custom *renderer* for the ``RadioSelect`` widget which outputs radio buttons
+ horizontally instead of vertically (as the default renderer would do).
+ """
+ def render(self):
+ return mark_safe(u'\n'.join([u'%s\n' % w for w in self]))
+

0 comments on commit b388507

Please sign in to comment.