1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

[1.0.X] Fixed #10243, #11043 -- Corrected handling of formsets over a ForeignKey that uses to_field, and by extension, fixed the admin for handling fields of that type. Thanks to apollo13 for the initial patch.

Merge of r10756 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10758 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Russell Keith-Magee
2009-05-13 14:32:18 +00:00
parent 17d214a982
commit c482859105
4 changed files with 51 additions and 5 deletions

View File

@@ -0,0 +1,9 @@
from django.db import models
class User(models.Model):
username = models.CharField(max_length=12, unique=True)
serial = models.IntegerField()
class UserSite(models.Model):
user = models.ForeignKey(User, to_field="username")
data = models.IntegerField()