# Path: eff_site/eff/models.py



from django import forms
from django.forms import ModelForm
from django.contrib.auth.models import User, Group
from django.contrib.auth.forms import UserCreationForm
from django.forms.util import ErrorList
from eff_site.eff.models import UserProfile, Client, AvgHours, Wage
            pass
        return self.cleaned_data


class ClientReportForm(EffQueryForm):
    """ Admin to generate client reports """
    client = forms.ModelChoiceField(queryset=Client.objects.all(),
                                    empty_label="----")


class DumpUploadForm(forms.Form):
    csv_file = forms.FileField()

    def clean(self):
        csv_file = self.cleaned_data.get('csv_file')
        if not csv_file:
            return self.cleaned_data
        if csv_file.content_type != 'text/csv':
            raise forms.ValidationError('Only CSV files are allowed.')
        return self.cleaned_data


class AvgHoursModelForm(forms.ModelForm):
    class Meta:
        model = AvgHours
        exclude = ('user',)


class WageModelForm(forms.ModelForm):
    class Meta:

# Path: eff_site/eff/models.py



# Path: eff_site/eff/forms.py
from django import forms
from django.forms import ModelForm
from django.contrib.auth.models import User, Group
from django.contrib.auth.forms import UserCreationForm
from django.forms.util import ErrorList
from eff_site.eff.models import UserProfile, Client, AvgHours, Wage

            pass
        return self.cleaned_data


class ClientReportForm(EffQueryForm):
    """ Admin to generate client reports """
    client = forms.ModelChoiceField(queryset=Client.objects.all(),
                                    empty_label="----")


class DumpUploadForm(forms.Form):
    csv_file = forms.FileField()

    def clean(self):
        csv_file = self.cleaned_data.get('csv_file')
        if not csv_file:
            return self.cleaned_data
        if csv_file.content_type != 'text/csv':
            raise forms.ValidationError('Only CSV files are allowed.')
        return self.cleaned_data


class AvgHoursModelForm(forms.ModelForm):
    class Meta:
        model = AvgHours
        exclude = ('user',)


class WageModelForm(forms.ModelForm):
    class Meta:

        model = Wage