将客户GPS位置上传到数据库

时间:2019-02-03 12:17:53

标签: django geolocation

我正在尝试将客户GPS位置上传到数据库。运行服务器时出现以下错误消息。

我的代码:

from django.db import models
from django.contrib.gis.db import models as geo_models
class Order(models.Model):
table_num = models.ForeignKey(Table,on_delete=models.DO_NOTHING)
date = models.DateField(auto_now_add=True)
value=models.IntegerField(blank=True, null=True,default=0)
state=models.IntegerField(default=0)
lan= models.IntegerField(default=0)
location = geo_models.PointField()

def __str__(self):
   return str(self.id)

错误消息:

django.core.exceptions.ImproperlyConfigured: Could not find the GDAL 
library (tried "gdal", "GDAL", "gdal2.1.0", "gdal2.0.0", "gdal1.11.0", " 
gdal1.10.0", "gdal1.9.0"). Is GDAL installed? If it is, try setting 
GDAL_LIBRARY_PATH in your settings.

0 个答案:

没有答案