Re: form new versus edit
On Saturday, 14 May 2011 22:14:38 UTC+1, Greg Donald wrote:
On Sat, May 14, 2011 at 4:08 PM, Shawn Milochik <sh...@milochik.com> wrote:
> The problem is that you're doing this at all. You should instead be using {{
> form.name }} to put the field in the form.
Well that works for the vanilla case but I need access to the data.
--
Greg Donald
Which is what Shawn said. If you follow the pattern described in the excellent documentation, you'll see that there's no reason to try and reference the form's data, as the form will re-render itself anyway if validation fails. And there's no reason to have separate templates or views for add and edit.
--
DR.
-- 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.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home