def clean_username(self):
        if RegistrationProfile.objects(
            username__iexact=self.cleaned_data['username']):

            raise forms.ValidationError(
                _(u'This username is already taken. Please choose another.'))

        return self.cleaned_data['username']
Validate that the username is alphanumeric and is not already
dataset/ETHPy150Open lig/django-registration-me/registration/forms.py/RegistrationForm.clean_username