+                    try:
38
+                        gisinfo = requests.get(settings.GIS_2_ADMINISTRATIVE_DIVISION.format(v.get('lat', 0), v.get('lon', 0))).json()
39
+                    except Exception as e:
40
+                        logger.info(e.message)
41
+                    if gisinfo.get('error') != 0:
42
+                        continue
43
+                    ymd = v.get('ymd', 0)
44
+                    ym = v.get('ym', 0)
45
+                    zh1 = gisinfo.get('data', {}).get('zh1', '')
46
+
47
+                close_old_connections()

+ 0 - 0
commands/migrations/__init__.py


+ 6 - 0
commands/models.py

@@ -0,0 +1,6 @@
1
+from __future__ import unicode_literals
2
+
3
+from django.db import models
4
+
5
+
6
+# Create your models here.

+ 4 - 0
commands/tests.py

@@ -0,0 +1,4 @@
1
+from django.test import TestCase
2
+
3
+
4
+# Create your tests here.

+ 4 - 0
commands/views.py

@@ -0,0 +1,4 @@
1
+from django.shortcuts import render
2
+
3
+
4
+# Create your views here.

+ 4 - 0
kodo/settings.py

@@ -52,6 +52,7 @@ INSTALLED_APPS = (
52 52
     'api',
53 53
     'account',
54 54
     'box',
55
+    'commands',
55 56
     'group',
56 57
     'integral',
57 58
     'logs',
@@ -390,6 +391,9 @@ KODO_DEFAULT_BRAND_DOMAIN = ''
390 391
 
391 392
 KODO_CLERK_AUTH_URL = 'http://pai.ai/w/o?r=http%3A%2F%2Fkodo.xfoto.com.cn%2Fp%2Fclerk%3Fbrand_id%3D{0}'
392 393
 
394
+# 经纬度
395
+GIS_2_ADMINISTRATIVE_DIVISION = 'http://116.196.105.215:1234/gis?auth_user=freevip&latitude={0}&longitude={1}'
396
+
393 397
 try:
394 398
     from local_settings import *
395 399
 except ImportError:

+ 1 - 1
requirements.txt

@@ -4,7 +4,7 @@ Pillow==5.0.0
4 4
 StatusCode==1.0.0
5 5
 TimeConvert==1.4.3
6 6
 cryptography==1.5.2
7
-furl==1.2.1
7
+furl==2.0.0
8 8
 isoweek==1.3.3
9 9
 jsonfield==2.0.2
10 10
 mock==2.0.0

+ 3 - 0
utils/redis/rkeys.py

@@ -66,3 +66,6 @@ APP_PATCH_INFO = 'app:patch:info:%s:%s:%s'  # STRING,APP 补丁信息,platfo
66 66
 
67 67
 # BOX 相关
68 68
 BOX_PROGRAM_VERSION_INFO = 'box:program:version:info'  # STRING,BOX 程序版本信息
69
+
70
+# 小程序相关
71
+MINI_PROGRAM_GIS_LIST = 'tamron:miniprogram:gis:list'

kodo - Gogs: Go Git Service

暂无描述

0010_userinfo_uuid.py 548B

    # -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('account', '0009_auto_20160428_1410'), ] operations = [ migrations.AddField( model_name='userinfo', name='uuid', field=models.CharField(max_length=255, blank=True, help_text='\u901a\u7528\u552f\u4e00\u8bc6\u522b\u7801 (Universally Unique Identifier)', null=True, verbose_name='uuid', db_index=True), ), ]