Задать вопрос

Тел: +7 965 3737 888

446

Просмотров

0

Ответов

Horizontal RadioSelect widget

The problem with Django's default Radio button widget is that it puts the buttons in a vertical format and the documentation is somewhat silent on how to make them horizontal. If you are dealing with a long list of buttons then veritical is probably the way to go but if you are dealing with "YES/NO" situation or any other boolean choice then you will probably want them horizontal.

Basically I just took the code and even the explanation from here:

https://wikis.utexas.edu/display/~bm6432/Django-Modifying+RadioSelect+Widget+to+have+horizontal+buttons

Вопрос полезен? Да0/Нет0
file_5145.py(411.0б)
None