Doh! As much as I read in the forms section, I skipped the ModelForms part,
even though that's what I was using!
Thanks again!
James
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroup
Yeah, it's documented. Right at the tippy-top of the ModelForms docs.
http://docs.djangoproject.com/en/1.3/topics/forms/modelforms/
--
You received this message because you are subscribed to the Google Groups "Django
users" group.
To post to this group, send email to django-users@googlegroups
On 04/26/2011 06:04 PM, Kenny Meyer wrote:
On Tue, Apr 26, 2011 at 4:17 PM, Shawn Milochik wrote:
If you're creating a ModelForm that already has data in the database, don't
pass in request.POST. Instead, pass in the instance with the 'instance'
keyword argument.
For example, if it was a Model
On Tue, Apr 26, 2011 at 4:17 PM, Shawn Milochik wrote:
> If you're creating a ModelForm that already has data in the database, don't
> pass in request.POST. Instead, pass in the instance with the 'instance'
> keyword argument.
>
> For example, if it was a ModelForm for the User object: form =
> Us
That did it. 99% of the time the data will be there; I can write
exception clauses for when it isn't. I think I'll use this method,
though I had just discovered the "initial" dictionary argument as
well, a few minutes before I noticed your reply. Is there a spot in
the Django docs that explains thi
If you're creating a ModelForm that already has data in the database,
don't pass in request.POST. Instead, pass in the instance with the
'instance' keyword argument.
For example, if it was a ModelForm for the User object: form =
UserForm(instance = request.user)
--
You received this messa
I'm struggling to create a method by which a user can update his user
profile, where the current information is displayed in the "edit"
form, and I'm hoping someone here can point out what I'm doing wrong.
I am not using ubernostrum's django-profiles for this because it
hasn't been touched in quite
7 matches
Mail list logo