Re: Django signup problem Urgent

2017-03-28 Thread Melvyn Sopacua
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[1] 
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


[1] https://ccbv.co.uk/projects/Django/1.10/django.views.generic.edit/FormView/

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@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/1782037.10WnRrGJpY%40devstation.
For more options, visit https://groups.google.com/d/optout.


Re: Django signup problem Urgent

2017-03-27 Thread Babatunde Akinyanmi
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. If you want to
be able to save the model with the description field empty, you need to add
`null=True` to the description field's arguments.

On 27 Mar 2017 18:49, "Idowu Julius"  wrote:

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+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@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.

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@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/CA%2BWjgXMiZCG3VDwP2N9S9yT%2Bm9WwcHar3Sz3gUKO-E0q1%2BG71A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Django signup problem Urgent

2017-03-27 Thread Idowu Julius
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+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@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.