예제 #1
0
파일: models.py 프로젝트: xiedantibu/uliweb
 def get_model(cls, table):
     if isinstance(table, int):
         obj = cls.get(cls.c.id == table)
     else:
         obj = cls.get(cls.c.table_name == table)
     if obj:
         return _get_model(obj.table_name)
예제 #2
0
파일: models.py 프로젝트: jamiesun/uliweb
 def get_model(cls, table):
     if isinstance(table, int):
         obj = cls.get(cls.c.id == table)
     else:
         obj = cls.get(cls.c.table_name == table)
     if obj:
         return _get_model(obj.table_name)
예제 #3
0
파일: models.py 프로젝트: znanl/uliweb
 def get_model(cls, table):
     if isinstance(table, int):
         obj = cls.get(cls.c.id == table)
     else:
         obj = cls.get(cls.c.table_name == table)
     if obj:
         return _get_model(obj.table_name)
     else:
         raise NotFound("Can't find model of table [%s]" % str(table))
예제 #4
0
파일: models.py 프로젝트: 08haozi/uliweb
 def get_model(cls, table):
     if isinstance(table, int):
         obj = cls.get(cls.c.id == table)
     else:
         obj = cls.get(cls.c.table_name == table)
     if obj:
         return _get_model(obj.table_name)
     else:
         raise NotFound("Can't find model of table [%s]" % str(table))