Browse Source

数据库调整

yf_ymm 5 years atrás
parent
commit
83a42872b7
3 changed files with 30 additions and 31 deletions
  1. 28 29
      apps/AppInfo/admin.py
  2. 1 1
      apps/AppInfo/models.py
  3. 1 1
      apps/Equipment/views.py

+ 28 - 29
apps/AppInfo/admin.py

@@ -5,8 +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,QXZ_Alarm_Log,\
-Expert
+CKArticle,GardenManage,GardenArea,Areacrop,Store_Manage,Hotel_Info,Hotel_Photo,FarmUser,FarmList,Pick_Pub,Sell_Manage,Person_Pick,QXZAutoswitch, Pic_Info,Sightsee_Info,QXZ_Alarm_Log
 
 
 
@@ -786,32 +785,32 @@ class QXZ_Alarm_LogAdmin(admin.ModelAdmin):
     
 
 
-# 专家表
-@admin.register(Expert)
-class ExpertAdmin(admin.ModelAdmin):
-    actions_on_bottom = False
-    actions_on_top = True
-    # 详情显示项:
-    fields = [
-        'name',
-        'relation',
-        'desc',
-        'pic',
-        'upl_time',
-    ]
-    # 列表显示项:
-    list_display = [
-        'name',
-        'relation',
-        'desc',
-        'pic',
-        'upl_time',
-    ]
-    # 筛选过滤项:
-    list_filter = ('upl_time',)
-    # 搜索项:
-    search_fields = ['name']
-    # 设置每页显示记录数:
-    list_per_page = 10    
+# # 专家表
+# @admin.register(Expert)
+# class ExpertAdmin(admin.ModelAdmin):
+#     actions_on_bottom = False
+#     actions_on_top = True
+#     # 详情显示项:
+#     fields = [
+#         'name',
+#         'relation',
+#         'desc',
+#         'pic',
+#         'upl_time',
+#     ]
+#     # 列表显示项:
+#     list_display = [
+#         'name',
+#         'relation',
+#         'desc',
+#         'pic',
+#         'upl_time',
+#     ]
+#     # 筛选过滤项:
+#     list_filter = ('upl_time',)
+#     # 搜索项:
+#     search_fields = ['name']
+#     # 设置每页显示记录数:
+#     list_per_page = 10    
 
 

+ 1 - 1
apps/AppInfo/models.py

@@ -673,7 +673,7 @@ class QXZ_Alarm_Log(models.Model):
 
 
 # 专家数据表
-class Expert(models.Model):
+class Experts(models.Model):
     name = models.CharField(u'专家名字',max_length=20, blank=True, null=True)
     relation = models.CharField(u'联系方式',max_length=20, blank=True, null=True)
     desc = models.CharField(u'专家描述',max_length=50, blank=True, null=True)

+ 1 - 1
apps/Equipment/views.py

@@ -24,7 +24,7 @@ from apps.AppInfo.models import (
     Hotel_Info, Hotel_Photo, JKdata, MyUser, Pick_Pub, Product, QXZdata,
     QXZdata_New, QXZstatus, QXZstatus_New, QXZswitchdata, QXZswitchstatus,
     Video_data,GardenArea,Store_Manage,Areacrop,Sell_Manage,Person_Pick,QXZAutoswitch,Sightsee_Info,Pic_Info,
-    QXZ_Alarm_Log,Expert)
+    QXZ_Alarm_Log)
 from apps.Equipment.all_dict import qxz_dict