rabin 6 years ago
parent
commit
8f5faf6cc5

+ 2 - 2
admin/main.py

@@ -6,5 +6,5 @@
     author:rabin
 """
 from page import *
-from demeter.web.application import *
-start(url)
+from demeter.web import *
+Web.start(url)

+ 3 - 3
admin/page/__init__.py

@@ -5,10 +5,10 @@
     author:rabin
     这里写页面逻辑
 """
-from demeter.web.api import *
+from demeter.web import *
 path = os.path.split(os.path.realpath(__file__))[0] + '/'
-files = loadFile(path)
+files = Web.file(path)
 url = []
 for key in files:
 	module = __import__(key, globals())
-	url = loadUrl(module, key, url)
+	url = Web.url(module, key, url)

+ 1 - 1
admin/page/__load__.py

@@ -4,7 +4,7 @@
     demeter load
     author:rabin
 """
-from demeter.web.base import *
+from demeter.web import *
 
 class Load(Base):
 	KEYS = ('farm', 'admin')

+ 4 - 3
front/api/__init__.py

@@ -5,10 +5,11 @@
     author:rabin
     这里写页面逻辑
 """
-from demeter.web.api import *
+import os
+from demeter.web import *
 path = os.path.split(os.path.realpath(__file__))[0] + '/'
-files = loadFile(path)
+files = Web.file(path)
 url = []
 for key in files:
 	module = __import__(key, globals())
-	url = loadUrl(module, key, url)
+	url = Web.url(module, key, url)

+ 1 - 1
front/api/__load__.py

@@ -4,7 +4,7 @@
     demeter load
     author:rabin
 """
-from demeter.web.base import *
+from demeter.web import *
 
 class Load(Base):
 	KEYS = ('farm', 'user')

+ 2 - 2
front/main.py

@@ -6,5 +6,5 @@
     author:rabin
 """
 from api import *
-from demeter.web.application import *
-start(url)
+from demeter.web import *
+Web.start(url)

+ 1 - 2
model/__load__.py

@@ -5,6 +5,5 @@
     name:__load__.py
     author:rabin
 """
-from demeter.model.base import Base
-from demeter.model.sql import Fields
+from demeter.model import *
 from demeter.core import *

+ 1 - 1
model/article.py

@@ -7,7 +7,7 @@
 """
 from __load__ import *
 
-class Article(Base):
+class Article(Model):
 	__table__ = 'article'
 	__comment__ = '文章表'
 	id = Fields(type='uuid', primaryKey=True, comment='文章ID', uuid='farm_id')

+ 1 - 1
model/article_category.py

@@ -7,7 +7,7 @@
 """
 from __load__ import *
 
-class Article_category(Base):
+class Article_category(Model):
 	__table__ = 'article_category'
 	__comment__ = '文章分类表'
 	id = Fields(type='uuid', primaryKey=True, comment='分类ID', uuid='farm_id')

+ 1 - 1
model/content.py

@@ -7,7 +7,7 @@
 """
 from __load__ import *
 
-class Content(Base):
+class Content(Model):
 	__table__ = 'content'
 	__comment__ = '首页资料表'
 	id = Fields(type='int', primaryKey=True, autoIncrement=True, comment='内容ID')

+ 1 - 1
model/data.py

@@ -7,7 +7,7 @@
 """
 from __load__ import *
 
-class Data(Base):
+class Data(Model):
 	__table__ = 'data'
 
 	def setTable(self, data):

+ 1 - 1
model/device_gateway.py

@@ -7,7 +7,7 @@
 """
 from __load__ import *
 
-class Device_gateway(Base):
+class Device_gateway(Model):
 	__table__ = 'device_gateway'
 	__comment__ = '设备网关管理'
 	id = Fields(type='uuid', primaryKey=True, comment='网关ID', uuid='farm_id')

+ 1 - 1
model/device_group.py

@@ -7,7 +7,7 @@
 """
 from __load__ import *
 
-class Device_group(Base):
+class Device_group(Model):
 	__table__ = 'device_group'
 	__comment__ = '设备分组管理'
 	id = Fields(type='uuid', primaryKey=True, comment='分组ID', uuid='farm_id')

+ 1 - 1
model/device_info.py

@@ -7,7 +7,7 @@
 """
 from __load__ import *
 
-class Device_info(Base):
+class Device_info(Model):
 	__table__ = 'device_info'
 	__comment__ = '设备管理'
 	id = Fields(type='uuid', primaryKey=True, comment='设备ID', uuid='farm_id')

+ 1 - 1
model/device_mul.py

@@ -7,7 +7,7 @@
 """
 from __load__ import *
 
-class Device_mul(Base):
+class Device_mul(Model):
 	__table__ = 'device_mul'
 	__comment__ = '设备批量控制'
 	id = Fields(type='uuid', primaryKey=True, comment='分组ID', uuid='farm_id')

+ 1 - 1
model/device_page.py

@@ -6,7 +6,7 @@
     author:rabin
 """
 from __load__ import *
-class Device_page(Base):
+class Device_page(Model):
 	__table__ = 'device_page'
 	__comment__ = '设备页面管理'
 	id = Fields(type='uuid', primaryKey=True, comment='页面ID', uuid='farm_id')

+ 1 - 1
model/device_printer.py

@@ -6,7 +6,7 @@
     author:rabin
 """
 from __load__ import *
-class Device_printer(Base):
+class Device_printer(Model):
 	__table__ = 'device_printer'
 	__comment__ = '设备打印机管理'
 	id = Fields(type='uuid', primaryKey=True, comment='打印机ID', uuid='farm_id')

+ 1 - 1
model/device_set.py

@@ -7,7 +7,7 @@
 """
 from __load__ import *
 
-class Device_set(Base):
+class Device_set(Model):
 	__table__ = 'device_set'
 	__comment__ = '设备设置'
 	id = Fields(type='uuid', primaryKey=True, comment='设备设置ID', uuid='farm_id')

+ 1 - 1
model/device_type.py

@@ -7,7 +7,7 @@
 """
 from __load__ import *
 
-class Device_type(Base):
+class Device_type(Model):
 	__table__ = 'device_type'
 	__comment__ = '设备类型'
 	id = Fields(type='int', primaryKey=True, autoIncrement=True, comment='设备类型ID')

+ 1 - 1
model/farm.py

@@ -7,7 +7,7 @@
 """
 from __load__ import *
 
-class Farm(Base):
+class Farm(Model):
 	__table__ = 'farm'
 	__comment__ = '园区主表'
 	id = Fields(type='int', primaryKey=True, autoIncrement=True, comment='园区ID')

+ 1 - 1
model/farm_user.py

@@ -7,7 +7,7 @@
 """
 from __load__ import *
 
-class Farm_user(Base):
+class Farm_user(Model):
 	__table__ = 'farm_user'
 	__comment__ = '园区用户表'
 	id = Fields(type='uuid', primaryKey=True, comment='园区用户ID', uuid='farm_id')

+ 1 - 1
model/farm_work.py

@@ -7,7 +7,7 @@
 """
 from __load__ import *
 
-class Farm_work(Base):
+class Farm_work(Model):
 	__table__ = 'farm_work'
 	__comment__ = '园区农事表'
 	id = Fields(type='uuid', primaryKey=True, comment='农事ID', uuid='farm_id')

+ 1 - 1
model/farm_work_category.py

@@ -7,7 +7,7 @@
 """
 from __load__ import *
 
-class Farm_work_category(Base):
+class Farm_work_category(Model):
 	__table__ = 'farm_work_category'
 	__comment__ = '农事分类表'
 	id = Fields(type='uuid', primaryKey=True, comment='分类ID', uuid='farm_id')

+ 1 - 1
model/farm_work_land.py

@@ -7,7 +7,7 @@
 """
 from __load__ import *
 
-class Farm_work_land(Base):
+class Farm_work_land(Model):
 	__table__ = 'farm_work_land'
 	__comment__ = '农事地块表'
 	id = Fields(type='uuid', primaryKey=True, comment='地块ID', uuid='farm_id')

+ 1 - 1
model/hardware.py

@@ -7,7 +7,7 @@
 """
 from __load__ import *
 
-class Hardware(Base):
+class Hardware(Model):
 	__table__ = 'hardware'
 	__comment__ = '硬件设备表'
 	id = Fields(type='uuid', primaryKey=True, comment='硬件设备表ID', uuid='farm_id')

+ 1 - 1
model/hardware_type.py

@@ -7,7 +7,7 @@
 """
 from __load__ import *
 
-class Hardware_type(Base):
+class Hardware_type(Model):
 	__table__ = 'hardware_type'
 	__comment__ = '硬件类型'
 	id = Fields(type='int', primaryKey=True, autoIncrement=True, comment='硬件类型ID')

+ 1 - 1
model/manage_admin.py

@@ -7,7 +7,7 @@
 """
 from __load__ import *
 
-class Manage_admin(Base):
+class Manage_admin(Model):
 	__table__ = 'manage_admin'
 	__comment__ = '超级管理员'
 	id = Fields(type='int', primaryKey=True, autoIncrement=True, comment='管理员ID')

+ 1 - 1
model/manage_log.py

@@ -7,7 +7,7 @@
 """
 from __load__ import *
 
-class Manage_log(Base):
+class Manage_log(Model):
 	__table__ = 'manage_log'
 	__comment__ = '后台日志表'
 	id = Fields(type='int', primaryKey=True, autoIncrement=True, comment='日志ID')

+ 1 - 1
model/manage_role.py

@@ -7,7 +7,7 @@
 """
 from __load__ import *
 
-class Manage_role(Base):
+class Manage_role(Model):
 	__table__ = 'manage_role'
 	__comment__ = '角色表'
 	id = Fields(type='int', primaryKey=True, autoIncrement=True, comment='角色ID')

+ 1 - 1
model/msg.py

@@ -9,7 +9,7 @@
 """
 from __load__ import *
 
-class Msg(Base):
+class Msg(Model):
 	__table__ = 'msg'
 	__comment__ = '消息表'
 	id = Fields(type='uuid', primaryKey=True, comment='消息ID', uuid='farm_id')

+ 1 - 1
model/msg_type.py

@@ -7,7 +7,7 @@
 """
 from __load__ import *
 
-class Msg_type(Base):
+class Msg_type(Model):
 	__table__ = 'msg_type'
 	__comment__ = '消息类型表'
 	id = Fields(type='int', primaryKey=True, autoIncrement=True, comment='消息类型ID')

+ 1 - 1
model/origin_batch.py

@@ -7,7 +7,7 @@
 """
 from __load__ import *
 
-class Origin_batch(Base):
+class Origin_batch(Model):
 	__table__ = 'origin_batch'
 	__comment__ = '溯源批次表'
 	id = Fields(type='uuid', primaryKey=True, comment='批次ID', uuid='farm_id')

+ 1 - 1
model/set.py

@@ -7,7 +7,7 @@
 """
 from __load__ import *
 
-class Set(Base):
+class Set(Model):
 	__table__ = 'set'
 	__comment__ = '设置表'
 	id = Fields(type='int', primaryKey=True, autoIncrement=True, comment='设置ID')

+ 1 - 1
pub.py

@@ -5,7 +5,7 @@
     name:pub.py
     author:rabin
 """
-from demeter.mqtt.pub import *
+from demeter.mqtt import *
 import random
 import time
 

+ 1 - 1
sub.py

@@ -5,5 +5,5 @@
     name:sub.py
     author:rabin
 """
-from demeter.mqtt.sub import *
+from demeter.mqtt import *
 Sub()

+ 2 - 2
tcp.py

@@ -5,8 +5,8 @@
     name:tcp.py
     author:rabin
 """
-from demeter.tcp.server import *
-from demeter.mqtt.pub import *
+from demeter.tcp import *
+from demeter.mqtt import *
 
 if __name__ == '__main__':	
 	print "Server start ......"