소스 검색

接口增加参数

yf_ymm 5 년 전
부모
커밋
01c83e4337
1개의 변경된 파일31개의 추가작업 그리고 1개의 파일을 삭제
  1. 31 1
      apps/AppInfo/admin.py

+ 31 - 1
apps/AppInfo/admin.py

@@ -5,7 +5,7 @@ from django.utils.translation import ugettext_lazy as _
 from django.contrib.auth.forms import UserCreationForm, UserChangeForm
 # Register your models here.
 from apps.AppInfo.models import MyUser, QXZdata, QXZstatus, Equip, Equip_type, QXZdata_New, JKdata, Article, Video_data,Product,Blog,QXZstatus_New,QXZswitchstatus,QXZswitchdata,\
-CKArticle,GardenManage,GardenArea,Areacrop,Store_Manage,Hotel_Info,Hotel_Photo,FarmUser,FarmList,Pick_Pub,Sell_Manage,Person_Pick,QXZAutoswitch, Pic_Info,Sightsee_Info
+CKArticle,GardenManage,GardenArea,Areacrop,Store_Manage,Hotel_Info,Hotel_Photo,FarmUser,FarmList,Pick_Pub,Sell_Manage,Person_Pick,QXZAutoswitch, Pic_Info,Sightsee_Info,Alarm_Record
 
 
 
@@ -754,3 +754,33 @@ class Sightsee_InfoAdmin(admin.ModelAdmin):
     search_fields = ['addr']
     # 设置每页显示记录数:
     list_per_page = 10
+    
+    
+    
+# 气象站阈值表QXZAutoswitch模型注册和装饰:
+@admin.register(Alarm_Record)
+class Alarm_RecordAdmin(admin.ModelAdmin):
+    actions_on_bottom = False
+    actions_on_top = True
+    # 详情显示项:
+    fields = [
+        'equip_id',
+        'logs',
+        'ekey',
+        'upl_time',
+    ]
+    # 列表显示项:
+    list_display = [
+        'equip_id',
+        'logs',
+        'ekey',
+        'upl_time',
+    ]
+    # 筛选过滤项:
+    list_filter = ('upl_time',)
+    # 搜索项:
+    search_fields = ['addr']
+    # 设置每页显示记录数:
+    list_per_page = 10
+    
+