Example #1
0
	def clean_username(self):
		username = self.cleaned_data['username']
		if not verify_username(self.cleaned_data['username']):
			raise forms.ValidationError(MESSAGES['INVALID_USERNAME'])
		if User.objects.filter(username=username).count():
			raise forms.ValidationError(MESSAGES["USERNAME_TAKEN"].format(username=username))
		return username
Example #2
0
 def clean_username(self):
     username = self.cleaned_data['username']
     if not verify_username(self.cleaned_data['username']):
         raise forms.ValidationError(MESSAGES['INVALID_USERNAME'])
     if User.objects.filter(username=username).count():
         raise forms.ValidationError(
             MESSAGES["USERNAME_TAKEN"].format(username=username))
     return username
Example #3
0
	def clean_username(self):
		username = self.cleaned_data["username"]
		if not verify_username(username):
			raise forms.ValidationError(MESSAGES['INVALID_USERNAME'])
		if User.objects.filter(username=username).count():
			raise forms.ValidationError(
				"This username is taken.  Try one of {0}_1 through {0}_10."
				.format(username))
		return username
Example #4
0
 def clean_username(self):
     username = self.cleaned_data["username"]
     if not verify_username(username):
         raise forms.ValidationError(MESSAGES['INVALID_USERNAME'])
     if User.objects.filter(username=username).count():
         raise forms.ValidationError(
             "This username is taken.  Try one of {0}_1 through {0}_10.".
             format(username))
     return username
Example #5
0
	def clean_username(self):
		username = self.cleaned_data["username"]
		if not verify_username(username):
			raise forms.ValidationError(MESSAGES['INVALID_USERNAME'])
		return username
Example #6
0
 def clean_username(self):
     username = self.cleaned_data["username"]
     if not verify_username(username):
         raise forms.ValidationError(MESSAGES['INVALID_USERNAME'])
     return username