On Tuesday 23 June 2009 09:14:01 adelaide_mike wrote:
> form = MyModelForm(initial={'myforeignkeyfieldname': myvalue})

assuming the foreignkey value exists, then you would have to insert it's id 
into the field myforeignkeyfieldname_id.
-- 
regards
kg
http://lawgon.livejournal.com

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to