could you please paste code in form valid block ?
Many thanks,
Serge
+380 636150445
skype: skhohlov
On Thu, Oct 9, 2014 at 11:23 AM, termopro wrote:
> I am using form.is_valid()
>
> On Thursday, October 9, 2014 10:54:56 AM UTC+3, Sergiy Khohlov wrote:
>>
>> Are you using form_valid method i
I am using form.is_valid()
On Thursday, October 9, 2014 10:54:56 AM UTC+3, Sergiy Khohlov wrote:
>
> Are you using form_valid method in view ?
>
> Many thanks,
>
> Serge
>
>
> +380 636150445
> skype: skhohlov
>
> On Thu, Oct 9, 2014 at 10:10 AM, termopro
> > wrote:
>
>> Hi,
>>
>> I am building a
Are you using form_valid method in view ?
Many thanks,
Serge
+380 636150445
skype: skhohlov
On Thu, Oct 9, 2014 at 10:10 AM, termopro wrote:
> Hi,
>
> I am building a user registration page. Page has a form where user can
> select his current state and city.
>
> The problem with that is that
Hi,
I am building a user registration page. Page has a form where user can
select his current state and city.
The problem with that is that i cannot load list of cities into the form
when the page is being generated.
That's because i show the user only cities from his state, not all of them.
S
On May 13, 5:17 pm, zweb wrote:
> I am doing this
>
> form = ContactForm(request.POST) # A form bound to the POST data
> if form.is_valid(): # All validation rules pass
>
> As clean is called by is_valid() and at this point form in bound to
> POST data, I cannot use self.instance unless I do thi
I am doing this
form = ContactForm(request.POST) # A form bound to the POST data
if form.is_valid(): # All validation rules pass
As clean is called by is_valid() and at this point form in bound to
POST data, I cannot use self.instance unless I do this
form = ContactForm(request.POST,
I have used sessions to store the initial db record so that when I go into
my form I retrieve the value
such as
stationrec = request.session['stationrec']
On Thu, May 13, 2010 at 9:36 AM, zweb wrote:
> I am using a model form to edit (change) an exisiting row in db.
>
> in clean_xxx() method I
"Also, a model form instance bound to a model object will contain a
self.instance attribute that gives model form methods access to that specific
model instance."
From:
http://docs.djangoproject.com/en/1.1/topics/forms/modelforms/
So you can refer to self.instance in your validation code, assu
I am using a model form to edit (change) an exisiting row in db.
in clean_xxx() method I want to compare the old (existing) value
versus new value.
I can get new value from cleaned_data.
How do I get the old (existing) value?
If I do a db query to get the existing row from DB how do I get the
9 matches
Mail list logo