Hello everyone i would be glad if anybody can solve this problem with me. I am trying to signup users from AbstractUser model but after preparing the signup page i keep getting error of this field is required and i have checked error this is the model file https://ghostbin.com/paste/bk7y3 and the form.py file https://ghostbin.com/paste/c3ajm
and the views file https://ghostbin.com/paste/yfuwq thank you in anticipation of your correct response
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/c4508b3d-0b56-4df6-9df3-19a004ab61f4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
On Monday 27 March 2017 20:19:11 Babatunde Akinyanmi wrote:
> Hello Idowu.
> You were supposed to include your stack trace so that there can be a
> proper diagnosis of the problem. Now we can only guess.
>
> I guess you are submitting your form with the `description` field
> empty because your defined it with `blank=True` in your models.py.
Wrong diagnosis. You would not get a "field is required" message, but "this field cannot be null" (which comes from the model layer, not the form layer).
The problem is two-fold:
1) You're trying to do everything yourself that's already abstracted. Use at minimum generic.FormView
2) The image field: it is required and you're not passing request.FILES to the form.
And maybe a third: encoding type of the form should be set correctly.
--
Melvyn Sopacua