The only way I could find to do is with 'raise ValidationError'()' in
the clean() function. However, trying to query my User model to see
if that username is already take does not work from the clean()
function. On the other hand, I cannot find a way to set the error in
the form object from inside the view.
I prefer to do this from inside of the view, rather than from the
clean function. I already have several validation rules there that I
created, but I'd prefer to keep the Form class separate from my
models. Any suggestions?
-John
The only way I could find to do is with 'raise ValidationError'()' in
the clean() function. However, trying to query my User model to see
if that username is already take does not work from the clean()
function.