本文整理汇总了Python中SOAPpy.SOAPProxy.obtenerGruposAsignaturaInformatica方法的典型用法代码示例。如果您正苦于以下问题:Python SOAPProxy.obtenerGruposAsignaturaInformatica方法的具体用法?Python SOAPProxy.obtenerGruposAsignaturaInformatica怎么用?Python SOAPProxy.obtenerGruposAsignaturaInformatica使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SOAPpy.SOAPProxy
的用法示例。
在下文中一共展示了SOAPProxy.obtenerGruposAsignaturaInformatica方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: getGrados
# 需要导入模块: from SOAPpy import SOAPProxy [as 别名]
# 或者: from SOAPpy.SOAPProxy import obtenerGruposAsignaturaInformatica [as 别名]
def getGrados(request):
if request.method == "GET":
codigo = request.GET.get('cod')
curso = request.GET.get('curso')
server = SOAPProxy('www.abj-ws-devborja.c9users.io:8080')
res = server.obtenerGruposAsignaturaInformatica(codigo, curso)
return HttpResponse(res)
示例2: obtenerGrupos
# 需要导入模块: from SOAPpy import SOAPProxy [as 别名]
# 或者: from SOAPpy.SOAPProxy import obtenerGruposAsignaturaInformatica [as 别名]
def obtenerGrupos(request):
if request.method == "POST":
server = SOAPProxy('www.abj-ws-devborja.c9users.io:8080')
server2 = SOAPProxy('www.abj-ws-devborja.c9users.io:8082')
body_unicode = request.body.decode('utf-8')
received_json_data = json.loads(body_unicode)
data = []
for key, value in received_json_data.iteritems():
for item in value:
obj = {}
res = server.obtenerGruposAsignaturaInformatica(item, key)
res = json.loads(server.obtenerHorarioAsignatura(item, res["grupos"][0]))
#res = json.loads(server.obtenerHorarioAsignatura(item, "01"))
obj["nombreAsignatura"] = res["nombreAsignatura"]
obj["eventos"] = res["horarioGrupoAsignatura"][0]["eventos"]
data.append(obj)
with open('anual.json') as data_file:
dataCal = json.load(data_file)
horario = server2.crearCalendarioCompleto(json.dumps(data), json.dumps(dataCal))
calendario = {}
calendario["calendario"] = horario
return HttpResponse(json.dumps(calendario))