|
@@ -5,7 +5,7 @@ from django.utils.translation import ugettext_lazy as _
|
|
|
from django.contrib.auth.forms import UserCreationForm, UserChangeForm
|
|
from django.contrib.auth.forms import UserCreationForm, UserChangeForm
|
|
|
# Register your models here.
|
|
# 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,\
|
|
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']
|
|
search_fields = ['addr']
|
|
|
# 设置每页显示记录数:
|
|
# 设置每页显示记录数:
|
|
|
list_per_page = 10
|
|
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
|
|
|
|
|
+
|
|
|
|
|
+
|