mirror of
https://github.com/django/django.git
synced 2025-10-26 15:16:09 +00:00
[1.7.x] Fixed #23009: Shorten FK identifiers in add_field and make consistent
This commit is contained in:
@@ -129,8 +129,16 @@ class UniqueTest(models.Model):
|
||||
unique_together = ["year", "slug"]
|
||||
|
||||
|
||||
class AuthorWithEvenLongerName(models.Model):
|
||||
name = models.CharField(max_length=255)
|
||||
height = models.PositiveIntegerField(null=True, blank=True)
|
||||
|
||||
class Meta:
|
||||
apps = new_apps
|
||||
|
||||
|
||||
class BookWithLongName(models.Model):
|
||||
author_foreign_key_with_really_long_field_name = models.ForeignKey(Author)
|
||||
author_foreign_key_with_really_long_field_name = models.ForeignKey(AuthorWithEvenLongerName)
|
||||
|
||||
class Meta:
|
||||
apps = new_apps
|
||||
|
||||
Reference in New Issue
Block a user