pan rel="diff-8432524c6d9399c307c95cf5a668dd925e05cd9aR22">22
+                ('macid', models.CharField(blank=True, help_text='设备号', max_length=32, null=True, verbose_name='macid')),
23
+                ('temperature', models.FloatField(default=0, help_text='用户体温', verbose_name='temperature')),
24
+            ],
25
+            options={
26
+                'verbose_name': '体温信息',
27
+                'verbose_name_plural': '体温信息',
28
+            },
29
+        ),
30
+        migrations.DeleteModel(
31
+            name='ThermometerInfo',
32
+        ),
33
+    ]

+ 0 - 0
temperature/migrations/__init__.py


+ 28 - 0
temperature/models.py

@@ -0,0 +1,28 @@
1
+# -*- coding: utf-8 -*-
2
+
3
+from django.db import models
4
+from django.utils.translation import gettext_lazy as _
5
+from django_models_ext import BaseModelMixin
6
+
7
+
8
+class TemperatureInfo(BaseModelMixin):
9
+    thermometer_id = models.CharField(_('thermometer_id'), max_length=32, blank=True, help_text='体温计唯一标识', db_index=True)
10
+    user_id = models.CharField(_('user_id'), max_length=32, blank=True, help_text='用户唯一标识', db_index=True)
11
+    macid = models.CharField(_('macid'), max_length=32, blank=True, null=True, help_text='设备号')
12
+    temperature = models.FloatField(_('temperature'), default=0, help_text='用户体温')
13
+
14
+    class Meta:
15
+        verbose_name = _('体温信息')
16
+        verbose_name_plural = _('体温信息')
17
+
18
+    def __unicode__(self):
19
+        return self.pk
20
+
21
+    @property
22
+    def data(self):
23
+        return {
24
+            'thermometer_id': self.thermometer_id,
25
+            'user_id': self.user_id,
26
+            'macid': self.macid,
27
+            'temperature': self.temperature,
28
+        }

+ 4 - 0
temperature/tests.py

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

+ 4 - 0
temperature/views.py

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

+ 1 - 1
thermometer/models.py

@@ -2,7 +2,7 @@
2 2
 
3 3
 from django.db import models
4 4
 from django.utils.translation import gettext_lazy as _
5
-from django_models_ext import BaseModelMixin, SexModelMixin
5
+from django_models_ext import BaseModelMixin
6 6
 from shortuuidfield import ShortUUIDField
7 7
 
8 8
 

+ 1 - 0
tiwen/settings.py

@@ -58,6 +58,7 @@ INSTALLED_APPS = [
58 58
     'api',
59 59
     'account',
60 60
     'thermometer',
61
+    'temperature',
61 62
 ]
62 63
 
63 64
 MIDDLEWARE = [

Kodo/kodo - Gogs: Go Git Service

420 コミット (e8cd9652b76a3a6d334ce3cb5ff4af7a91aa7401)

作者 SHA1 メッセージ 日付
  Brightcells e8cd9652b7 Add gather_screenshot for api tg_group_gather_start_api 9 年 前
  Brightcells 1ecd4f276f Remove status code NO_XX_PERMISSION 9 年 前
  Brightcells 505b2802c5 Change to fixed price 9 年 前
  Brightcells d824fbd441 Add photo_md5 for GroupPhotoInfo 9 年 前
  Brightcells 6611483294 Fix Bug: Group Photo Not Empty 9 年 前
  Brightcells fd73524af1 Add api group_delete_api 9 年 前
  Brightcells f6bdf82918 Set group info after photo upload & Add group photo num in group info 9 年 前
  Brightcells 95be9f6b91 Set group.PhotoCommentInfo ==> comment utf8mb4 9 年 前
  Brightcells 136346961f Fix Bug: UnboundLocalError at /s/join -- local variable 'group_photo' referenced before assignment 9 年 前
  Brightcells 2eba3ed7f9 Add guest login for tourguide 9 年 前
  Brightcells 7bcf74b5da ACTIVE_GROUP_NOT_FOUND 9 年 前
  Brightcells a62888a984 Fix Bug: _in => __in 9 年 前
  Brightcells 5ebf9b60ba have_active_group 9 年 前
  Brightcells b27a2f135c Fix Bug: check whether have tour goup or not error 9 年 前
  Brightcells 882848b93f Disable actions by actions=None 9 年 前
  Brightcells a3ae7a664c Update requirements.txt 9 年 前
  Brightcells 6279e898c4 Override delete_selected by using django-admin==1.0.1 9 年 前
  Brightcells 84163f001e Fix Bug: file_path.url 9 年 前
  Brightcells c98fa4a4ed upload_file_url 9 年 前
  Brightcells a7b59d4389 Redis' set/setex/get => RedisExtensions' setjson/setexjson/getjson 9 年 前
  Brightcells 4f87058e1c Add patch_api 9 年 前
  Brightcells f63cce369a Update requirements.txt 9 年 前
  Brightcells 0e7b5eb1af Update order_by of group session photos 9 年 前
  Brightcells ba179547b1 Change to use pysnippets 9 年 前
  Brightcells 356bc17051 isort 9 年 前
  Brightcells e7f3abdf56 Add admin relative api 9 年 前
  Brightcells 22cbf27523 Recall tg_group_transfer_api 9 年 前
  Brightcells ae0ac478f3 set_tour_guide_own_group in tg_group_transfer_api 9 年 前
  Brightcells 3b745fc07a Change to get_tour_guide_own_group when group_id not exists 9 年 前
  Brightcells bcb6e8c9ca Filter status=True 9 年 前
  Brightcells 5ec8568418 Remove unused import lib 9 年 前
  Brightcells 385f4c5143 from StatusCode import StatusCodeField 9 年 前
  Brightcells d06c19c1d5 Fix Bug: photo_watermark_path 9 年 前
  Brightcells 962dfeef0a WECHAT_OAUTH2_RETRY_REDIRECT_URI 9 年 前
  Brightcells d4c2c2a8d7 Change to use pywe-response 9 年 前
  Brightcells c3e3681541 Create user in api get_userinfo_api for weapp 9 年 前
  Brightcells f183c19ae8 Limit return quota num for flyimg 9 年 前
  Brightcells 4c6dbc149d return comments/thumbup/thumbups for api flyimg_detail_api 9 年 前
  Brightcells 44ff9cb865 Add api flyimg_detail_api 9 年 前
  Brightcells e9e810dc97 Fix Bug: unionid => unionId 9 年 前
  Brightcells 7049ae7e19 mini/userinfo 9 年 前
  Brightcells b52202a821 appId/appsecret 9 年 前
  Brightcells ac895ae2cd Add new api get_userinfo_api 9 年 前
  Brightcells 2d6faa5600 Add WECHAT_OAUTH2_RETRY_REDIRECT_URI 9 年 前
  Brightcells 96f741a814 Update upload_path 9 年 前
  Brightcells 435363c27a file md5 error 9 年 前
  Brightcells 90fd7187d8 file md5 9 年 前
  Brightcells 8d20a44c71 Remove 'Only Once Function' 9 年 前
  Brightcells ae70dce3ef file md5 9 年 前
  Brightcells 6e308e93b4 file md5 9 年 前