Thanks, that is exactly what I've been reading for the past hours but i can't
make it work.
>From what i understand:
I do this in my models.py
class AuthorForm(ModelForm):
class Meta:
model = Author
Where do i have to put this to
f = AuthorForm(request.POST)
?!
My guess was in the view but that tells me that AuthorForm is not defined.
Could you give me a hint ?!
Kind regards
Von: [email protected] [mailto:[email protected]] Im
Auftrag von Daniel Roseman
Gesendet: Montag, 14. Februar 2011 13:49
An: [email protected]
Betreff: Re: Form to add data
On Monday, February 14, 2011 12:42:48 PM UTC, Szabo, Patrick (LNG-VIE) wrote:
Hi,
How do i add a form to a template/view that let's me add a Databaseentry.
I also want to list all the entries from a certain table in on the same site.
Now I'm reading the documentaion and it says something about automaticly
creating such forms from models but i can't figure out what exactly i have to
do to make it work.
http://docs.djangoproject.com/en/1.2/topics/forms/modelforms/
--
DR.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.
. . . . . . . . . . . . . . . . . . . . . . . . . .
Patrick Szabo
XSLT-Entwickler
LexisNexis
Marxergasse 25, 1030 Wien
mailto:[email protected]
Tel.: +43 (1) 534 52 - 1573
Fax: +43 (1) 534 52 - 146
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.