What do you mean by having the ID "in" the form? I don't quite understand what you are trying to do.
On Jul 21, 4:15 pm, mettwoch <[email protected]> wrote: > Ok, I come back to what I wrote before. If the partner already exists > it has an id (primary-key or whatever). If it doesn't exist it has no > id. I'd just like to have the id in the form. Is it a bug, is > something missing here or am I completely on the wrong track. That's > basic database form handling. Well I could fallback to using Form > instead of ModelForm and maybe I'll manage to get that id in the form > as a hidden field or whatever, but I wonder how such basic things seem > impossible with the ModelForm. > > Thanks for Your patience > > Marc > > On Jul 21, 9:55 pm, Shawn Milochik <[email protected]> wrote: > > > > > On Jul 21, 2009, at 3:39 PM, mettwoch wrote: > > > > Sorry to insist, but that's what I don't understand here. How can I > > > know that the partner that is 'posted' is new or not? I really become > > > crazy here. I can't believe after all the good things I've discovered > > > in Django that this can be so hard. > > > Okay, thanks for clarifying. > > > Well, you can have the partner identified in the URL by a slug or > > something, for one. That's probably the easiest way. You do need to > > track it somehow, starting when you pull the instance from the > > database to populate the ModelForm. Otherwise, how can you know that > > it's someone new versus someone with the same details? > > > The way I'm doing it is by having separate views and urls for editing > > and creating a new entry. But in any case you have to write something > > somewhere when you are pulling an existing record. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

