mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #30661 -- Added models.SmallAutoField.
This commit is contained in:
committed by
Mariusz Felisiak
parent
955b382600
commit
194d1dfc18
@@ -9,6 +9,11 @@ class City(models.Model):
|
||||
return self.name
|
||||
|
||||
|
||||
class Country(models.Model):
|
||||
id = models.SmallAutoField(primary_key=True)
|
||||
name = models.CharField(max_length=50)
|
||||
|
||||
|
||||
class District(models.Model):
|
||||
city = models.ForeignKey(City, models.CASCADE, primary_key=True)
|
||||
name = models.CharField(max_length=50)
|
||||
|
||||
Reference in New Issue
Block a user