On 3/2/06, Glenn Tenney <[EMAIL PROTECTED]> wrote:

a.reporter=r2
a.save()
# I also tried a.reporter=r2.id with the same results

What is the correct way to change a "ForeignKey" field's
relationship?   What am I missing?????

a.reporter_id = r2.id
a.save()

The magic-removal branch also allows a.reporter = r2; a.save().

Hope this helps,
Russ Magee %-)
 

--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to