Hello,
I read very quickly, but you sure you want to *render* and get the value
of "user_create" from the client?
It can be modified by any client...
aRkadeFR
On 03/31/2015 10:45 AM, François GUÉRIN wrote:
Hi,
I'm using multiple formsets in Create / Update views, and I want to
set some *hidd
I'll try to answer myself :-)
because widget=forms.HiddenInput() is invalid widget for
DateTimeField.
Changed in Django 1.0: The DateTimeField used to use a TextInput
widget by default. This has now changed.
So I left the original DateTimeInput for this field and used
{{ form.some_hidden_field.a
oh, great, you were right, thank you
"Validation errors are hold back until the clean method returns the
cleaned_data dict."
really the some_hidden_field was invalid, I included {{ form.errors }}
to my template and the validation error appeared suddenly :-)
What I still don't understand, why thi
> I thought my def clean(self) is the third step in your explanation:
Yes that's right. But this clean methods gets called even if your
Field raised a ValidationError. Validation errors are hold back until
the clean method returns the cleaned_data dict. Try to 'get' the key
(not calling it direc
I thought my def clean(self) is the third step in your explanation:
1. run the clean method of the form field itself. Here:
DateTimeField.clean()
2. then run the clean_() method of the form if available
3. once those two methods are run for every field, run the clean()
method of the form
So I bel
Django validates form data in this order when calling is_valid or
full_clean:
1. run the clean method of the form field itself. Here:
DateTimeField.clean()
2. then run the clean_() method of the form if available
3. once those two methods are run for every field, run the clean()
method of the form
> form = newFenceForm(initial={'auth_id' : auth_id})
Awesome. That was exactly what I needed - thanks very much.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, se
On Tue, 2008-11-25 at 18:03 -0800, ChrisK wrote:
> OK, thanks for your suggestions (and yes, I meant "POST").
>
> The problem now appears to be how I initialize the form's value of
> auth_id!
Oh, right. I missed that error initially. Yes, you're doing it
incorrectly. The first positional argum
OK, thanks for your suggestions (and yes, I meant "POST").
The problem now appears to be how I initialize the form's value of
auth_id! If I use just
{{form.as_p}}
in my template, I get the following html:
(Hidden field auth_id) This field is
required.
This field is required.
Teaser:
This fiel
On Tue, 2008-11-25 at 15:06 -0800, ChrisK wrote:
> I'm just not getting this. I've looked at many examples and can't seem
> to pass a hidden value into a form.
>
> The problem is that I initially get to the form with GET, and then
> instantiate the form with PUT. The key that I need is part of t
On Nov 25, 6:24 pm, ChrisK <[EMAIL PROTECTED]> wrote:
> > Well..you aren't passing auth_id to the template, you are passing
> > form. auth_id is a field inside your template. Can you post your
> > template?
>
> Oh, sorry - my oversight. Template is
>
>
> id="id_auth_id" />
> Reminder String:
>
> Well..you aren't passing auth_id to the template, you are passing
> form. auth_id is a field inside your template. Can you post your
> template?
Oh, sorry - my oversight. Template is
Reminder String:
URL of document:
Address of interest:
Range (in meters):
I guess I'm
On Nov 25, 5:06 pm, ChrisK <[EMAIL PROTECTED]> wrote:
> I'm just not getting this. I've looked at many examples and can't seem
> to pass a hidden value into a form.
>
> The problem is that I initially get to the form with GET, and then
> instantiate the form with PUT. The key that I need is part o
I had a similar situation with hidden fields. I was using a newform,
but didn't include the hidden fields. Then, in my template I had
something like:
{{ form }}
where id_email had been set earlier in the view. This worked for me.
On Oct 2, 7:27 am, Ana <[EMAIL PROTECTED]> wrote:
>
Thanks RajeshD :)
It wasn't exactly what I wanted to do but it was helpful.
On Sep 7, 4:45 pm, RajeshD <[EMAIL PROTECTED]> wrote:
> On Sep 7, 9:55 am, Ana <[EMAIL PROTECTED]> wrote:
>
> > Hi,
> > I'd like to have "last modified by" and "owner" fields in my
> > application. I'd like to set fields
On Sep 7, 9:55 am, Ana <[EMAIL PROTECTED]> wrote:
> Hi,
> I'd like to have "last modified by" and "owner" fields in my
> application. I'd like to set fields value automatically, and I want
> those fields to be hidden. Is there any way I can do that?
Yes.
Here's one way to do it:
Add those t
16 matches
Mail list logo