1
0
mirror of https://github.com/django/django.git synced 2025-10-26 15:16:09 +00:00

[1.7.x] Fixed #23455 -- Accept either bytes or text for related_name, convert to text.

Backport of c72eb80d11 from master.
This commit is contained in:
Carl Meyer
2014-12-11 17:28:03 -07:00
parent b376071936
commit 0a8b911582
4 changed files with 10 additions and 6 deletions

View File

@@ -26,7 +26,7 @@ def get_foo():
class Bar(models.Model):
b = models.CharField(max_length=10)
a = models.ForeignKey(Foo, default=get_foo)
a = models.ForeignKey(Foo, default=get_foo, related_name=b'bars')
class Whiz(models.Model):