Jelajahi Sumber

Adjusted model definition in GeoDjango tutorial.

The example uses the world border data set, where
one of the entries has a null field value.
David Smith 4 tahun lalu
induk
melakukan
6bc9283751
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  1. 1 1
      docs/ref/contrib/gis/tutorial.txt

+ 1 - 1
docs/ref/contrib/gis/tutorial.txt

@@ -203,7 +203,7 @@ model to represent this data::
         name = models.CharField(max_length=50)
         area = models.IntegerField()
         pop2005 = models.IntegerField('Population 2005')
-        fips = models.CharField('FIPS Code', max_length=2)
+        fips = models.CharField('FIPS Code', max_length=2, null=True)
         iso2 = models.CharField('2 Digit ISO', max_length=2)
         iso3 = models.CharField('3 Digit ISO', max_length=3)
         un = models.IntegerField('United Nations Code')