I am noticing that when I load an existing ModelForm into a template, and I save (POST), I can't seem to get the primary key back in order to update that specific record. I am starting to head down the path of formsets...but that is not what I need. I am updating one record only. Any help is appreciated!
VIEW def UpdateMember(request): if request.method == "POST": # I don't seem to have access to primary key... # I do have the posted data, and can save to database here. TEMPLATE (as you can see, I've tried to explicitly include primary key, both inside and outside the for loop) {{ Member.MemberID }} {% for field in Member %} {{ field.label_tag }} {{ field }} {% endfor %} <input type="button" onclick="document.forms[0].submit()" value="save"> --~--~---------~--~----~------------~-------~--~----~ 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---