<commit_before>from django import forms
from .models import Champion, Position

class DraftForm(forms.Form):
    CHAMPIONS = Champion.objects.order_by('display_name')
    CHAMPION_CHOICES = []
    for champion in CHAMPIONS:
        CHAMPION_CHOICES.append((champion.id, champion.display_name))
        
    PICK_CHOICES = [("","")]+CHAMPION_CHOICES
    NO_BAN = -1
    BAN_CHOICES = [("",""),(NO_BAN,"No Ban")]+CHAMPION_CHOICES

    POSITIONS = Position.objects.order_by('id')
    POSITION_CHOICES = [(None,"")]
    for position in POSITIONS:
        POSITION_CHOICES.append((position.id, position.display_name))

    blue_style_class = "blue"
    red_style_class = "red"
    # fuck everything below this line
    widget_attrs = {'class':blue_style_class}
    blue_ban_0 = forms.ChoiceField(widget=forms.Select(attrs=widget_attrs), label="Ban 0", initial="", choices=BAN_CHOICES, required=False)
    blue_ban_1 = forms.ChoiceField(widget=forms.Select(attrs=widget_attrs), label="Ban 1", initial="", choices=BAN_CHOICES, required=False)
    blue_ban_2 = forms.ChoiceField(widget=forms.Select(attrs=widget_attrs), label="Ban 2", initial="", choices=BAN_CHOICES, required=False)
    blue_ban_3 = forms.ChoiceField(widget=forms.Select(attrs=widget_attrs), label="Ban 3", initial="", choices=BAN_CHOICES, required=False)
    blue_ban_4 = forms.ChoiceField(widget=forms.Select(attrs=widget_attrs), label="Ban 4", initial="", choices=BAN_CHOICES, required=False)

    blue_pick_0 = forms.ChoiceField(widget=forms.Select(attrs=widget_attrs), label="Pick 0", initial="", choices=PICK_CHOICES, required=False)
    blue_pick_1 = forms.ChoiceField(widget=forms.Select(attrs=widget_attrs), label="Pick 1", initial="", choices=PICK_CHOICES, required=False)
    blue_pick_2 = forms.ChoiceField(widget=forms.Select(attrs=widget_attrs), label="Pick 2", initial="", choices=PICK_CHOICES, required=False)
    blue_pick_3 = forms.ChoiceField(widget=forms.Select(attrs=widget_attrs), label="Pick 3", initial="", choices=PICK_CHOICES, required=False)
    blue_pick_4 = forms.ChoiceField(widget=forms.Select(attrs=widget_attrs), label="Pick 4", initial="", choices=PICK_CHOICES, required=False)

    blue_pos_0 = forms.TypedChoiceField(coerce=int, empty_value=None, widget=forms.Select(attrs=widget_attrs), label="Pos", choices=POSITION_CHOICES, required=False)
    blue_pos_1 = forms.TypedChoiceField(coerce=int, empty_value=None, widget=forms.Select(attrs=widget_attrs), label="Pos", choices=POSITION_CHOICES, required=False)
    blue_pos_2 = forms.TypedChoiceField(coerce=int, empty_value=None, widget=forms.Select(attrs=widget_attrs), label="Pos", choices=POSITION_CHOICES, required=False)
    blue_pos_3 = forms.TypedChoiceField(coerce=int, empty_value=None, widget=forms.Select(attrs=widget_attrs), label="Pos", choices=POSITION_CHOICES, required=False)<commit_msg>Nope that didnt work<commit_after>from django import forms
from .models import Champion, Position

class DraftForm(forms.Form):
    CHAMPIONS = Champion.objects.order_by('display_name')
    CHAMPION_CHOICES = []
#    for champion in CHAMPIONS:
#        CHAMPION_CHOICES.append((champion.id, champion.display_name))

    PICK_CHOICES = [("","")]+CHAMPION_CHOICES
    NO_BAN = -1
    BAN_CHOICES = [("",""),(NO_BAN,"No Ban")]+CHAMPION_CHOICES

    POSITIONS = Position.objects.order_by('id')
    POSITION_CHOICES = [(None,"")]
#    for position in POSITIONS:
#        POSITION_CHOICES.append((position.id, position.display_name))

    blue_style_class = "blue"
    red_style_class = "red"
    # fuck everything below this line
    widget_attrs = {'class':blue_style_class}
    blue_ban_0 = forms.ChoiceField(widget=forms.Select(attrs=widget_attrs), label="Ban 0", initial="", choices=BAN_CHOICES, required=False)
    blue_ban_1 = forms.ChoiceField(widget=forms.Select(attrs=widget_attrs), label="Ban 1", initial="", choices=BAN_CHOICES, required=False)
    blue_ban_2 = forms.ChoiceField(widget=forms.Select(attrs=widget_attrs), label="Ban 2", initial="", choices=BAN_CHOICES, required=False)
    blue_ban_3 = forms.ChoiceField(widget=forms.Select(attrs=widget_attrs), label="Ban 3", initial="", choices=BAN_CHOICES, required=False)
    blue_ban_4 = forms.ChoiceField(widget=forms.Select(attrs=widget_attrs), label="Ban 4", initial="", choices=BAN_CHOICES, required=False)

    blue_pick_0 = forms.ChoiceField(widget=forms.Select(attrs=widget_attrs), label="Pick 0", initial="", choices=PICK_CHOICES, required=False)
    blue_pick_1 = forms.ChoiceField(widget=forms.Select(attrs=widget_attrs), label="Pick 1", initial="", choices=PICK_CHOICES, required=False)
    blue_pick_2 = forms.ChoiceField(widget=forms.Select(attrs=widget_attrs), label="Pick 2", initial="", choices=PICK_CHOICES, required=False)
    blue_pick_3 = forms.ChoiceField(widget=forms.Select(attrs=widget_attrs), label="Pick 3", initial="", choices=PICK_CHOICES, required=False)
    blue_pick_4 = forms.ChoiceField(widget=forms.Select(attrs=widget_attrs), label="Pick 4", initial="", choices=PICK_CHOICES, required=False)

    blue_pos_0 = forms.TypedChoiceField(coerce=int, empty_value=None, widget=forms.Select(attrs=widget_attrs), label="Pos", choices=POSITION_CHOICES, required=False)
    blue_pos_1 = forms.TypedChoiceField(coerce=int, empty_value=None, widget=forms.Select(attrs=widget_attrs), label="Pos", choices=POSITION_CHOICES, required=False)
    blue_pos_2 = forms.TypedChoiceField(coerce=int, empty_value=None, widget=forms.Select(attrs=widget_attrs), label="Pos", choices=POSITION_CHOICES, required=False)
    blue_pos_3 = forms.TypedChoiceField(coerce=int, empty_value=None, widget=forms.Select(attrs=widget_attrs), label="Pos", choices=POSITION_CHOICES, required=False)
{'fraction_non_alphanumeric': 0.13721705562379366, 'fraction_numerical': 0.008773469029654325, 'mean_word_length': 7.189655172413793, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 2, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3693240', 'n_tokens_mistral': 1949, 'n_tokens_neox': 1837, 'n_words': 294}