yf_yzl 2 yıl önce
ebeveyn
işleme
e08dfb619f
2 değiştirilmiş dosya ile 2 ekleme ve 2 silme
  1. 1 1
      apps/Weather/models.py
  2. 1 1
      crond_script/crond_weather.py

+ 1 - 1
apps/Weather/models.py

@@ -3,7 +3,7 @@ from django.db import models
 
 class District(models.Model):
 
-    id = models.BigIntegerField("ID", primary_key=True)
+    id = models.CharField("ID", max_length=64, blank=True, null=True)
     city = models.CharField("城市", max_length=64, blank=True, null=True)
     pid = models.CharField("PID",max_length=64,  blank=True, null=True)
 

+ 1 - 1
crond_script/crond_weather.py

@@ -72,7 +72,7 @@ def init_data():
             defaults={
                 "id": k[0],
                 "city": k[1],
-                "pid": k[2]
+                "pid": str(k[2])
             }
         )