> - 0 utils/redis/connect.py
Datei anzeigen
@@ -0,0 +1,6 @@
1
+# -*- coding: utf-8 -*-
2
+
3
+from django.conf import settings
4
+
5
+
6
+r = settings.REDIS_CACHE

+ 1 - 0
utils/redis/rkeys.py

@@ -0,0 +1 @@
1
+# -*- coding: utf-8 -*-

+ 0 - 0
utils/user/__init__.py


+ 18 - 0
utils/user/userinfo_save.py

@@ -0,0 +1,18 @@
1
+# -*- coding: utf-8 -*-
2
+
3
+
4
+def userinfo_save(userinfo):
5
+    """ Save profile or something else """
6
+    # from account.models import UserInfo
7
+    # from django.conf import settings
8
+    #
9
+    # unique_identifier = userinfo.get(settings.WECHAT_UNIQUE_IDENTIFICATION, '')
10
+    #
11
+    # user, created = UserInfo.objects.select_for_update().get_or_create(**{settings.WECHAT_UNIQUE_IDENTIFICATION: unique_identifier})
12
+    # user.unionid = userinfo.get('unionid', '')
13
+    # user.openid = userinfo.get('openid', '')
14
+    # user.nickname = userinfo.get('nickname', '')
15
+    # user.avatar = userinfo.get('headimgurl', '')
16
+    # user.save()
17
+    #
18
+    # return user

kodo - Gogs: Go Git Service

説明なし

Brightcells: 018d52f61d Update package django_xxx 8 年 前
..
migrations f724e0f9c0 Add tour guide apis 10 年 前
__init__.py f724e0f9c0 Add tour guide apis 10 年 前
admin.py f724e0f9c0 Add tour guide apis 10 年 前
models.py f724e0f9c0 Add tour guide apis 10 年 前
tests.py f724e0f9c0 Add tour guide apis 10 年 前
views.py 018d52f61d Update package django_xxx 8 年 前