<commit_before>from django import forms
from django.contrib.auth.models import User
from gym_app.models import User, RegularAthlete, Tracker, Exercise, PersonalTrainer, BodyScreening

class UserForm(forms.ModelForm):
    
    password = forms.CharField(widget=forms.PasswordInput())

    def __init__(self, *args, **kwargs):
        super(UserForm, self).__init__(*args, **kwargs)

        for fieldname in ['username', 'password', 'email']:
            self.fields[fieldname].help_text = None

    class Meta:
        model = User
        fields = ('username','password', 'email', 'first_name', 'last_name')

class UserEditForm(forms.ModelForm):

    def __init__(self, *args, **kwargs):
        super(UserEditForm, self).__init__(*args, **kwargs)

    class Meta:
        model = User
        fields = ('first_name', 'last_name', 'email')

class ChangePasswordForm(forms.ModelForm):
    password = forms.CharField(widget=forms.PasswordInput())

    class Meta:
        model = User
        fields = ('password', )

class RegularAthleteForm(forms.ModelForm):
    class Meta:
        model = RegularAthlete
        fields = ('level', 'training_period', 'gender')

class PersonalTrainerForm(forms.ModelForm):
    class Meta:
        model = PersonalTrainer
        fields = ('gender',)

class ExerciseForm(forms.ModelForm):

    class Meta:
        model = Exercise
        fields = ('weight','repetition', 'sets')

class BodyScreeningForm(forms.ModelForm):
    class Meta:
        model = BodyScreening
        fields = ('triceps', 'biceps', 'subscapular','supraspinale','suprailic',
        'abdominal','chest','thigh','calf','weight','feet', 'inches')

class RegularAthleteSelectForm(forms.Form):
    athlete = forms.ModelChoiceField(queryset=User.objects.filter(groups__name='regular'), empty_label='...', to_field_name='username')

class UserTypeForm(forms.Form):
<commit_msg>Bug fix at screening premium athletes retrieving<commit_after>from django import forms
from django.contrib.auth.models import User
from gym_app.models import User, RegularAthlete, Tracker, Exercise, PersonalTrainer, BodyScreening
from django.db.models import Q

class UserForm(forms.ModelForm):
    
    password = forms.CharField(widget=forms.PasswordInput())

    def __init__(self, *args, **kwargs):
        super(UserForm, self).__init__(*args, **kwargs)

        for fieldname in ['username', 'password', 'email']:
            self.fields[fieldname].help_text = None

    class Meta:
        model = User
        fields = ('username','password', 'email', 'first_name', 'last_name')

class UserEditForm(forms.ModelForm):

    def __init__(self, *args, **kwargs):
        super(UserEditForm, self).__init__(*args, **kwargs)

    class Meta:
        model = User
        fields = ('first_name', 'last_name', 'email')

class ChangePasswordForm(forms.ModelForm):
    password = forms.CharField(widget=forms.PasswordInput())

    class Meta:
        model = User
        fields = ('password', )

class RegularAthleteForm(forms.ModelForm):
    class Meta:
        model = RegularAthlete
        fields = ('level', 'training_period', 'gender')

class PersonalTrainerForm(forms.ModelForm):
    class Meta:
        model = PersonalTrainer
        fields = ('gender',)

class ExerciseForm(forms.ModelForm):

    class Meta:
        model = Exercise
        fields = ('weight','repetition', 'sets')

class BodyScreeningForm(forms.ModelForm):
    class Meta:
        model = BodyScreening
        fields = ('triceps', 'biceps', 'subscapular','supraspinale','suprailic',
        'abdominal','chest','thigh','calf','weight','feet', 'inches')

class RegularAthleteSelectForm(forms.Form):
    athlete = forms.ModelChoiceField(queryset=User.objects.filter(Q(groups__name='regular') | Q(groups__name='premium')), empty_label='...', to_field_name='username')

class UserTypeForm(forms.Form):

{'fraction_non_alphanumeric': 0.13378273269380347, 'fraction_numerical': 0.0, 'mean_word_length': 3.852830188679245, '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': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3592351', 'n_tokens_mistral': 1152, 'n_tokens_neox': 1104, 'n_words': 249}