@@ -40,6 +40,16 @@ def get_point_info(request): |
||
40 | 40 |
|
41 | 41 |
|
42 | 42 |
@logit |
43 |
+def update_point_info(request): |
|
44 |
+ point_id = request.POST.get('point_id', '') |
|
45 |
+ upload_period = get_query_value(request, 'upload_period', val_cast_type='listjson') |
|
46 |
+ |
|
47 |
+ IsolationPointInfo.objects.filter(point_id=point_id).update(point_upload_period=upload_period) |
|
48 |
+ |
|
49 |
+ return response() |
|
50 |
+ |
|
51 |
+ |
|
52 |
+@logit |
|
43 | 53 |
def get_point_fields(request): |
44 | 54 |
point_id = request.POST.get('point_id', '') |
45 | 55 |
user_id = request.POST.get('user_id', '') |
@@ -32,6 +32,7 @@ urlpatterns += [ |
||
32 | 32 |
urlpatterns += [ |
33 | 33 |
url(r'^point/list$', point_views.get_point_list, name='point_list'), |
34 | 34 |
url(r'^point/info$', point_views.get_point_info, name='point_info'), |
35 |
+ url(r'^point/update$', point_views.update_point_info, name='point_update'), |
|
35 | 36 |
] |
36 | 37 |
|
37 | 38 |
urlpatterns += [ |
@@ -99,6 +99,7 @@ class IsolationPointInfo(BaseModelMixin): |
||
99 | 99 |
'point_id': self.point_id, |
100 | 100 |
'point_name': self.point_name, |
101 | 101 |
'point_fields': self.point_fields, |
102 |
+ 'point_upload_period': self.point_upload_period, |
|
102 | 103 |
'qrcode_url': qrcode_url, |
103 | 104 |
} |
104 | 105 |
|