Skip to content

Instantly share code, notes, and snippets.

@ymorin007
ymorin007 / forms.py
Last active August 29, 2015 14:02
Voting form
from crispy_forms.helper import FormHelper
from crispy_forms.layout import Submit, Reset
from django import forms
from fights.models import FightChoice
from users.models import User, UserVote
class FightChoiceField(forms.ModelChoiceField):
widget = forms.RadioSelect()
def __init__(self, *args, **kwargs):