Hi,
I have a very basic and beginner's question, I have created a new
`CreateView` for my project where you can submit an image with a title but
it is not working although an image is attached. I am not getting any error
the only thing I am receiving is `This field is required.` next t
Hi,
I have a very basic and beginner's question, I have created a new
`CreateView` for my project where you can submit an image with a title but
it is not working although an image is attached. I am not getting any error
the only thing I am receiving is `This field is required.` next t
email = self.validated_data['email'],
> password = self.validated_data['password'],
> )
> user.save()
> return user
>
> when i POST the values from postman it gives
> {
> "first_name": [
>
il = self.validated_data['email'],
password = self.validated_data['password'],
)
user.save()
return user
when i POST the values from postman it gives
{
"first_name": [
"This field is required."
Ok, got it
Thanks
Sachin
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/django-users/-/oif3taaCSlIJ.
To post to this group, send email to django-users@googlegroups.com
On Tue, Mar 20, 2012 at 8:24 PM, Sachin Gupta wrote:
> In a file upload form if the enctype attribute is not set then, django
> throws the error
>
> This field is required
>
> In case null=True and blank = True is set for the file field then nothing
> happens at all. Shou
In a file upload form if the enctype attribute is not set then, django
throws the error
- This field is required
In case null=True and blank = True is set for the file field then nothing
happens at all. Shouldn't it be such that django should throw some other
error since we are send
You can specify error message using that:
https://docs.djangoproject.com/en/1.3/ref/forms/fields/#error-messages
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/django-us
Hi, everyone:
I created a django form, when I validate it, the empty field that can not
be none shows error message "This field is required." Is there a way to
tell which filed is required instead of just saying "This field is
required." in general? Ex: Username is required.
Hey Luca,
i think u can give every formfield a dict of error messages like this:
forms.InputField(error_messages={'required':u'your MSG'})
Hope this helps
Sebastian
On 3 Jun., 18:34, luca72 wrote:
> hello at all.
> during the renderig of a form in any required field
hello at all.
during the renderig of a form in any required field is write "this
field is required", how i can overwrite this or delete it.
Thanks
Luca
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group,
UPDATE:
I found a workaround, but it's not pretty. Has anyone done this in a
more elegant manner?
1) when defining the initial data to pass into the FormWizard (I do
this in a view wrapped around the FormWizard):
if len(request.FILES):
initial.update({'request_files':request.FILES})
In the last step of my FormWizard, I have an ImageField. I've made
sure that the uploaded image is appearing in request.FILES, but I'm
still getting a "this field is required" error upon submission.
I assume that this problem is related to this ticket:
http://code.djangopro
; > and theTinyMCEeditor is applied in the admin.py
> > class NewsItemAdminForm(forms.ModelForm):
> > column1 = forms.CharField(widget=TinyMCE(attrs={'cols': 80, 'rows':
> > 25}))
>
> > Everthing performs as expected until saving when I recei
ows':
> 25}))
>
> Everthing performs as expected until saving when I receive an error
> reading "This field is required."
> Removing TinyMCE removes the error. Any ideas where to start with that
> one?
This is standard behaviour, not connected to TinyMCE. If you overr
I started using django-tinymce's HTMLField the previous line in
models.py is placed with this:
column1 = tinymce_models.HTMLField(blank=True, null=True)
which seems to take care of the errors. I would like to know why that
is, and I also generally like controlling forms in admin.py not in
models.
null=True)
and the TinyMCE editor is applied in the admin.py
class NewsItemAdminForm(forms.ModelForm):
column1 = forms.CharField(widget=TinyMCE(attrs={'cols': 80, 'rows':
25}))
Everthing performs as expected until saving when I receive an error
reading "This f
On 16-May-08, at 5:48 PM, Andre Meyer wrote:
> still need to figure out why ;-)
by default, django treats all fields as not null and not blank.
Usually, the 'null' part is enforced at the database level and the
'blank' part at django level. So for fields like CharFields, saying
null is al
min branch.
> >
> > after declaring a model class with an attribute that may be null (pn)
> > the admin site still tells me to fill in that field, because "This
> > field is required.", but it isn't.
> >
> > i have registered the model class
newforms-admin branch.
>
> after declaring a model class with an attribute that may be null (pn)
> the admin site still tells me to fill in that field, because "This
> field is required.", but it isn't.
>
> i have registered the model class to the admin site withou
Andre Meyer pisze:
> now, this is driving me crazy. this problem persists even after
> switching from 0.96.1 to the newforms-admin branch.
>
> after declaring a model class with an attribute that may be null (pn)
> the admin site still tells me to fill in that field, because &
On 16-May-08, at 5:36 PM, Andre Meyer wrote:
> after declaring a model class with an attribute that may be null
> (pn) the admin site still tells me to fill in that field, because
> "This field is required.", but it isn't.
have you set blank=Tru
branch.
>
> after declaring a model class with an attribute that may be null (pn) the
> admin site still tells me to fill in that field, because "This field is
> required.", but it isn't.
>
> i have registered the model class to the admin site without any custom
> o
On Fri, May 16, 2008 at 2:06 PM, Andre Meyer <[EMAIL PROTECTED]> wrote:
> pn = models.CharField('Publication number', max_length=20, null=True)
missing a 'blank=True'
--
For far too long, power has been concentrated in the hands of "root"
and his "wheel" oligarchy. We have instituted a dict
hi all
now, this is driving me crazy. this problem persists even after switching
from 0.96.1 to the newforms-admin branch.
after declaring a model class with an attribute that may be null (pn) the
admin site still tells me to fill in that field, because "This field is
required.", bu
On Sep 8, 1:31 am, olivier <[EMAIL PROTECTED]> wrote:
> Hi,
>
> > widget=forms.Select(attrs={'class': 'vSelectField'}))
>
> This let me think you use a javascript validator. Are you sure the
> message comes from the server ?
> You should try form.is_valid() or whatever.
no javascript. form.is_
Hi,
> widget=forms.Select(attrs={'class': 'vSelectField'}))
This let me think you use a javascript validator. Are you sure the
message comes from the server ?
You should try form.is_valid() or whatever.
> just printed "form.is_bound" in my view: the result is "True",
> although I didn´t invok
kk <[EMAIL PROTECTED]> wrote:
> I´m creating a dynamic newform and when going to the page, I´m getting
> an error-message "This Field is required", although required ist set
> to False when building the Form.
>
> Here´s part of the code:
>
> field_list = []
&g
I´m creating a dynamic newform and when going to the page, I´m getting
an error-message "This Field is required", although required ist set
to False when building the Form.
Here´s part of the code:
field_list = []
date = forms.ChoiceField(label='Wann', req
29 matches
Mail list logo