Oops werong action - incomplete message. I have a ModelForm: class ListingForm(ModelForm): class Meta: model = Listing
that has a method that, for a new record, should set the ForeighKey field "source" to an object identified in the UserProfile. The "date" value is stored the same way: if request.method == 'GET': if listing_id > '0': listing=Listing.objects.get(pk=listing_id) form = ListingForm(instance=listing) else: print "In listings GET source=", request.session['source'] # thus proving that the "source" object is known. form = ListingForm(initial={'date': request.session['date'], 'source': request.session['source'], 'agent': request.session['agent']}) return render_to_response('wha/listing_form.html', {'form': form, 'source': request.session['source'], 'date': date, }) The "date" is shown correctly, the "source" is not, though the widget is populated with the available choices. What am I doing wrong here? TIA Mike --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---