浏览代码

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 年之前
父节点
当前提交
6bc9283751
共有 1 个文件被更改,包括 1 次插入1 次删除
  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')