

def clean_filename(self):
    if ('submit' in fname.data):
        fname = self.cleaned_data.get('filename')
        if ((not fname) or (not fname.name.endswith('.csv'))):
            raise forms.ValidationError('Please upload a .csv file')
        return fname

dataset/ETHPy150Open pinax/symposion/symposion/schedule/forms.py ScheduleSectionForm.clean_filename/VarMisuse@14/18 `self`->`fname`