本文整理汇总了Python中Encoder.to_dict方法的典型用法代码示例。如果您正苦于以下问题:Python Encoder.to_dict方法的具体用法?Python Encoder.to_dict怎么用?Python Encoder.to_dict使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Encoder
的用法示例。
在下文中一共展示了Encoder.to_dict方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: get
# 需要导入模块: import Encoder [as 别名]
# 或者: from Encoder import to_dict [as 别名]
def get():
obj = Encoder.to_dict(request.vars)
rows = db(
(db.auth_membership.user_id == db.UsuarioUSB.id) & (db.auth_membership.group_id == db.auth_group.id)).select()
prueba=rows.as_json()
return rows.as_json()
示例2: etapas
# 需要导入模块: import Encoder [as 别名]
# 或者: from Encoder import to_dict [as 别名]
def etapas():
obj = Encoder.to_dict(request.vars)
rows = Etapa.find(obj)
response.view = 'mis_pasantias/etapas.load.html'
return dict(etapas=rows.as_list(),id="id")
示例3: get
# 需要导入模块: import Encoder [as 别名]
# 或者: from Encoder import to_dict [as 别名]
def get():
obj = Encoder.to_dict(request.vars)
rows = Pasantia.JMaterias(obj)
rows = rows.as_json()
return rows
示例4: get
# 需要导入模块: import Encoder [as 别名]
# 或者: from Encoder import to_dict [as 别名]
def get():
obj = Encoder.to_dict(request.vars)
rows = Permiso.find(obj)
rows = rows.as_json()
return rows
示例5: get
# 需要导入模块: import Encoder [as 别名]
# 或者: from Encoder import to_dict [as 别名]
def get():
obj = Encoder.to_dict(request.vars)
rows = Accion_Usuario.find(obj)
rows = rows.as_json()
return rows
示例6: configuracion
# 需要导入模块: import Encoder [as 别名]
# 或者: from Encoder import to_dict [as 别名]
def configuracion():
rows = []
obj = Encoder.to_dict(request.vars)
#TODO Hacer que esto filtre dependiendo del rol del usuario logeado
if ('currentUser' in session):
usuario = session.currentUser
rol = db((db.auth_membership.user_id == auth.user.id)
& (db.auth_membership.group_id == db.auth_group.id)).select().first()
rows = db((db.Accion_Usuario.rol == rol.auth_group.id) & (db.Accion_Usuario.contexto == 'configuracion')).select()
response.view = 'sidebar/configuracion.load.html'
return dict(routes=rows,id="id")
示例7: get
# 需要导入模块: import Encoder [as 别名]
# 或者: from Encoder import to_dict [as 别名]
def get():
obj = Encoder.to_dict(request.vars)
query = "db.Estudiante"
if 'searchTerm' in obj and obj['searchTerm'] != '{}':
query = dict()
search = ast.literal_eval(obj['searchTerm'])
query = "db.Estudiante." + search["key"] + ".startswith('" + search["value"] + "')"
rows = db(eval(query) & (db.Inscripcion.pasantia == db.Pasantia.id) & (db.Pasantia.estudiante == db.Estudiante.id) & (db.Pasantia.id == db.Plan_Trabajo.pasantia)).select()
return rows.as_json()
示例8: count
# 需要导入模块: import Encoder [as 别名]
# 或者: from Encoder import to_dict [as 别名]
def count():
obj = Encoder.to_dict(request.vars)
query = "db.Estudiante"
if 'searchTerm' in obj and obj['searchTerm'] != '{}':
query = dict()
search = ast.literal_eval(obj['searchTerm'])
query = "db.Estudiante." + search["key"] + ".startswith('" + search["value"] + "')"
count = db(eval(query) & (db.Plan_Trabajo.pasantia == db.Pasantia.id) & (db.Estudiante.id == db.Pasantia.estudiante)).count()
return count
示例9: get
# 需要导入模块: import Encoder [as 别名]
# 或者: from Encoder import to_dict [as 别名]
def get():
obj = Encoder.to_dict(request.vars)
rows = Material.find(obj)
for row in rows:
row.area = row.area.nombre_area
row.unidad_metrica = row.unidad_metrica.nombre_unidadMetrica
row.hasEnough = True
if (row.cantidad and row.cantidad_Minima):
if (row.cantidad < row.cantidad_Minima):
row.hasEnough = False
rows = rows.as_json()
return rows
示例10: get
# 需要导入模块: import Encoder [as 别名]
# 或者: from Encoder import to_dict [as 别名]
def get():
obj = Encoder.to_dict(request.vars)
rows = Empleado.find(obj)
#In case of references
for row in rows:
row.area = row.area.nombre_area
row.isActive = True
if row.estado == 'Inactivo':
row.isActive = False
rows = rows.as_json()
return rows
示例11: count
# 需要导入模块: import Encoder [as 别名]
# 或者: from Encoder import to_dict [as 别名]
def count():
obj = Encoder.to_dict(request.vars)
count = Material.count(obj)
return count
示例12: get
# 需要导入模块: import Encoder [as 别名]
# 或者: from Encoder import to_dict [as 别名]
def get():
obj = Encoder.to_dict(request.vars)
rows = db((db.Plan_Trabajo.pasantia == db.Pasantia.id) & (db.Pasantia.estudiante == db.Estudiante.id)).select()
return rows.as_json()
示例13: count
# 需要导入模块: import Encoder [as 别名]
# 或者: from Encoder import to_dict [as 别名]
def count():
obj = Encoder.to_dict(request.vars)
count = PlanTrabajo.count(obj)
return count
示例14: count
# 需要导入模块: import Encoder [as 别名]
# 或者: from Encoder import to_dict [as 别名]
def count():
obj = Encoder.to_dict(request.vars)
count = Permiso.count(obj)
return count
示例15: count
# 需要导入模块: import Encoder [as 别名]
# 或者: from Encoder import to_dict [as 别名]
def count():
obj = Encoder.to_dict(request.vars)
count = Pasantia.count(obj)
return count