Benedict Verheyen schreef: <snip> > FimAddManipulator.default["patient"] = patientid > or > FimAddManipulator.default["patient"] = Patient.objects.get(id=patientid) > > But no patient is selected when the form shows. > How can i set the selection of a dropdown box from a view or manipulator? >
Apparently i got confused again as to when to use the _id bit and when not, silly me :) FimAddManipulator.default["patient_id"]=patientid seems to do the trick. This is why i got confused: >>>m = MnaRisk.objects.all() >>>m[0] <Mna: 2006-10-13 Patient name x y> >>> m[0].patient <Patient: Patient name x y> Here i get all the mna risks. Then via the mna risk i get the patient the risk is linked to. No _id is needed. In forms you can also use id_patient and not id_patient_id. So overall you can drop the _id part but not when using Manipulators. Regards, Benedict --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

