mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
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.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10756 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
9
tests/regressiontests/model_formsets_regress/models.py
Normal file
9
tests/regressiontests/model_formsets_regress/models.py
Normal 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()
|
||||
Reference in New Issue
Block a user