def clean(self):
    if (self.cleaned_data['password'] != self.cleaned_data['password1']):
        raise forms.ValidationError('The passwords did not match. Please try again')
    myslug = slugify(self.cleaned_data['username'])
    try:
        Artist.objects.get(slug=myslug)
    except Artist.DoesNotExist:
        return self.cleaned_data
    raise forms.ValidationError('That username is already taken, please select another')
def clean(self):
    if (self.cleaned_data['password'] != self.cleaned_data['password1']):
        raise forms.ValidationError('The passwords did not match. Please try again')
    myslug = slugify(self.cleaned_data['username'])
    try:
        Artist.objects.get(slug=myslug)
    except Artist.DoesNotExist:
        return self.cleaned_data
    raise forms.ValidationError('That username is already taken, please select another')