old_contents: from django import forms
  
  class UploadFileForm(forms.Form):
      dict = forms.CharField(max_length=50)
      lesson = forms.CharField(max_length=50)
      file  = forms.FileField()
  
new_contents: from django import forms
  from django.contrib.auth.models import User
  
  class UploadFileForm(forms.Form):
      dict = forms.CharField(max_length=50)
      lesson = forms.CharField(max_length=50)
      file  = forms.FileField()
  
  class CrikeRegistrationForm(forms.Form):
      required_css_class = 'required'
  
      username = forms.RegexField(regex=r'^[\w.@+-]+$',
                                  max_length=30,
                                  label=_("Username"),
                                  error_messages={'invalid': _("This value may contain only letters, numbers and @/./+/-/_ characters.")})
      email = forms.EmailField(label=_("E-mail"))
      password1 = forms.CharField(widget=forms.PasswordInput,
                                  label=_("Password"))
      password2 = forms.CharField(widget=forms.PasswordInput,
                                  label=_("Password (again)"))
  
      def clean_username(self):
          existing = User.objects.filter(username__iexact=self.cleaned_data['username'])
          if existing.exists():
              raise forms.ValidationError(_("A user with that username already exists."))
          else:
              return self.cleaned_data['username']
  
      def clean(self):
          if 'password1' in self.cleaned_data and 'password2' in self.cleaned_data:
              if self.cleaned_data['password1'] != self.cleaned_data['password2']:
                  raise forms.ValidationError(_("The two password fields didn't match."))
          return self.cleaned_data
subject: copy from registration form, make it unique later