Ejemplo n.º 1
0
def getDocLeiModal(request, IdDocLei):
    x = SILPCache('cache')
    endereco = server.ServerEndereco(request)
    XMLdata = x.getContent(endereco + 'documenthistory/1/100/' + IdDocLei, 0)
    JsonWokflows = views.dicionaryWorkflow(request)

    XMLdataY = menus.getCommittesMenu(
        request)  #obtem dados do serviço getcommittes
    XMLmenusMinisterio = menus.getMinisteriesMenu(request)
    XMLGroupPolitico = menus.getGruposMenu(request)
    response_feed = views.getFeed(
        request)  #obtém dados de feed proveniente de http://asemana.sapo.cv

    context = {
        'documenthistory': XMLdata,
        'workflow': JsonWokflows,
        'DocId': IdDocLei,
        'committes': XMLdataY,
        'ministeries': XMLmenusMinisterio,
        'grupoPolitico': XMLGroupPolitico,
        'feed': str(response_feed.content, encoding='utf-8')
    }

    #return render_to_response('docLeiModal.html', context, context_instance=RequestContext(request))
    return render(request, 'app/docLeiModal.html', context)
Ejemplo n.º 2
0
def getIniciativa(request, IDMember):
    x = SILPCache('cache')
    endereco = server.ServerEndereco(request)
    IDLegislatura = views.getCourentLegislature(request)
    XMLdata = x.getContent(
        endereco + 'getdocsfromuser/1/10/' + str(IDLegislatura) + '/' +
        IDMember, 0)
    XMLdataY = menus.getCommittesMenu(
        request)  #obtem dados do serviço getcommittes
    XMLmenusMinisterio = menus.getMinisteriesMenu(request)
    XMLGroupPolitico = menus.getGruposMenu(request)

    #TotalIniciativa = tramites.getTotalIniciativa(request, IDLegislatura, IDMember)
    TotalIniciativa = getTotalIniciativa(request, IDLegislatura, IDMember)

    context = {
        'IDMember': IDMember,
        'IDLegislatura': IDLegislatura,
        'TotalIniciativa': TotalIniciativa,
        'XMLdata': XMLdata,
        'feed': '',
        'committes': XMLdataY,
        'ministeries': XMLmenusMinisterio,
        'grupoPolitico': XMLGroupPolitico
    }
    #return render_to_response('Iniciativas.html',context, context_instance=RequestContext(request))
    return render(request, 'app/Iniciativas.html', context)
Ejemplo n.º 3
0
def getMembers(request):
    x = SILPCache('cache')
    endereco = server.ServerEndereco(request)
    XMLdata  = x.getContent(endereco+'getmembers/1/9',4)
    x.getImage(XMLdata)
    response_feed = views.getFeed(request)
    XMLdataY = menus.getCommittesMenu(request)
    XMLMenuMinisterio = menus.getMinisteriesMenu(request)
    XMLGroupPolitico = menus.getGruposMenu(request)
    totalMember = getTotalNumberMember(request, 0)
    Partidos = views.getAllParty(request)

    context = {'partido': Partidos, 'lista': XMLdata, 'feed': str(response_feed.content, encoding='utf-8'),'committes': XMLdataY, 'ministeries': XMLMenuMinisterio, 'grupoPolitico': XMLGroupPolitico, 'TotalMember': totalMember}
    #return render_to_response('members.html', context, context_instance=RequestContext(self))
    return render(request,'app/members.html', context)
Ejemplo n.º 4
0
def getPesquisaAvancada(request):
    XMLdataY = menus.getCommittesMenu(
        request)  #obtem dados do serviço getcommittes
    XMLMenuMinisterio = menus.getMinisteriesMenu(request)
    XMLGroupPolitico = menus.getGruposMenu(request)
    esponse_feed = views.getFeed(
        request)  #obtém dados de feed proveniente de http://asemana.sapo.cv

    context = {
        'feed': str(esponse_feed.content, encoding='utf-8'),
        'committes': XMLdataY,
        'ministeries': XMLMenuMinisterio,
        'grupoPolitico': XMLGroupPolitico
    }
    #return render_to_response('pesquisa_avacada.html', context, context_instance=RequestContext(self))
    return render(request, 'app/pesquisa_avacada.html', context)
Ejemplo n.º 5
0
def getCalendar(request):
    x = SILPCache('cache')
    endereco = server.ServerEndereco(request)
    XMLdata = x.getContent(endereco + 'getscheduleditems/1/100', 0)
    XMLdataY = menus.getCommittesMenu(
        request)  #obtem dados do serviço getcommittes
    XMLMenuMinisterio = menus.getMinisteriesMenu(request)
    XMLGroupPolitico = menus.getGruposMenu(request)

    context = {
        'agendamentos': XMLdata,
        'committes': XMLdataY,
        'committes': XMLdataY,
        'ministeries': XMLMenuMinisterio,
        'grupoPolitico': XMLGroupPolitico
    }
    #return render_to_response('calendar.html', context, context_instance=RequestContext(self))
    return render(request, 'app/calendar.html', context)
Ejemplo n.º 6
0
def getMinisteries(request, IdMinisterio):
    x = SILPCache('cache')
    endereco = server.ServerEndereco(request)
    XMLdata = x.getContent(endereco + 'getministers/1/4/' + IdMinisterio, 0)
    XMLdataY = menus.getCommittesMenu(
        request)  #obtem dados do serviço getcommittes
    XMLMenuMinisterio = menus.getMinisteriesMenu(request)
    XMLGroupPolitico = menus.getGruposMenu(request)

    context = {
        'MinistersMembers': XMLdata,
        'feed': '',
        'committes': XMLdataY,
        'idMinisterio': IdMinisterio,
        'ministeries': XMLMenuMinisterio,
        'grupoPolitico': XMLGroupPolitico
    }
    #return render_to_response('Ministeries.html', context, context_instance=RequestContext(self))
    return render(request, 'app/Ministeries.html', context)
Ejemplo n.º 7
0
def getListGP(request):
    x = SILPCache('cache')
    endereco = server.ServerEndereco(request)
    XMLdata = x.getContent(endereco + 'getpoliticalgroups/1/100', 4)
    XMLdataY = menus.getCommittesMenu(
        request)  #obtem dados do servi�o getcommittes
    XMLMenuMinisterio = menus.getMinisteriesMenu(request)
    XMLGroupPolitico = menus.getGruposMenu(request)
    response_feed = views.getFeed(
        request)  #obt�m dados de feed proveniente de http://asemana.sapo.cv

    context = {
        'lista': XMLdata,
        'feed': str(response_feed.content, encoding='utf-8'),
        'committes': XMLdataY,
        'ministeries': XMLMenuMinisterio,
        'grupoPolitico': XMLGroupPolitico
    }
    #return render_to_response('grupos_politicos.html', context, context_instance=RequestContext(self))
    return render(request, 'app/grupos_politicos.html', context)
Ejemplo n.º 8
0
def getHome(request):
    x = SILPCache('C:/tmp/cache')
    endereco = server.ServerEndereco(request)
    XMLdata = x.getContent(endereco + 'getactivelegislature/1/1', 4)
    XMLdataY = menus.getCommittesMenu(
        request)  #obtem dados do serviço getcommittes
    XMLMenuMinisterio = menus.getMinisteriesMenu(request)
    XMLGroupPolitico = menus.getGruposMenu(request)
    response_feed = views.getFeed(
        request)  #obtém dados de feed proveniente de http://asemana.sapo.cv
    JsonWokflows = views.dicionaryWorkflowDocument(request)

    context = {
        'legislatura': XMLdata,
        'feed': str(response_feed.content, encoding='utf-8'),
        'committes': XMLdataY,
        'ministeries': XMLMenuMinisterio,
        'grupoPolitico': XMLGroupPolitico,
        'workflow': JsonWokflows
    }
    #return render_to_response('home.html', context, context_instance=RequestContext(self))
    return render(request, 'app/home.html', context)
Ejemplo n.º 9
0
def getPesquisa(request):
    endereco = server.ServerEndereco(request)
    XMLdataY = menus.getCommittesMenu(
        request)  #obtem dados do serviço getcommittes
    XMLMenuMinisterio = menus.getMinisteriesMenu(request)
    XMLGroupPolitico = menus.getGruposMenu(request)
    esponse_feed = views.getFeed(
        request)  #obtém dados de feed proveniente de http://asemana.sapo.cv

    valueSearch = self.GET['srch-term']

    result = requests.get(endereco + 'getcompletesearch/1/100/' + valueSearch)

    context = {
        'feed': str(esponse_feed.content, encoding='utf-8'),
        'committes': XMLdataY,
        'ministeries': XMLMenuMinisterio,
        'grupoPolitico': XMLGroupPolitico,
        'XMLdata': result
    }
    #return render_to_response('pesquisa.html', context, context_instance=RequestContext(self))
    return render(request, 'app/pesquisa.html', context)
Ejemplo n.º 10
0
def getGrupoPolitico(request, IdGpolitico):
    x = SILPCache('cache')
    endereco = server.ServerEndereco(request)
    XMLGroup = x.getContent(endereco + 'getgroup/' + IdGpolitico, 0)
    XMLdata = x.getContent(
        endereco + 'getpoliticalgroupmembers/1/9/' + IdGpolitico, 0)
    XMLdataY = menus.getCommittesMenu(
        request)  #obtem dados do servi�o getcommittes
    XMLMenuMinisterio = menus.getMinisteriesMenu(request)
    XMLGroupPolitico = menus.getGruposMenu(request)
    TotalMember = getTotalNumberMember(request, IdGpolitico)

    context = {
        'Group': XMLGroup,
        'GrupoPoliticoMember': XMLdata,
        'feed': '',
        'committes': XMLdataY,
        'idGrup': IdGpolitico,
        'ministeries': XMLMenuMinisterio,
        'grupoPolitico': XMLGroupPolitico,
        'TotalMembers': TotalMember
    }
    #return render_to_response('GrupoPolitico.html', context, context_instance=RequestContext(self))
    return render(request, 'app/GrupoPolitico.html', context)
Ejemplo n.º 11
0
def getDocIniciativas(request, IdDocPeticao):
    x = SILPCache('cache')
    endereco = server.ServerEndereco(request)
    XMLdata = x.getContent(endereco + 'documenthistory/1/100/' + IdDocPeticao,
                           0)

    XMLdataY = menus.getCommittesMenu(
        request)  #obtem dados do serviço getcommittes
    XMLmenusMinisterio = menus.getMinisteriesMenu(request)
    XMLGroupPolitico = menus.getGruposMenu(request)

    jsonWorkflow = views.dicionaryWorkflow(request)

    context = {
        'documenthistory': XMLdata,
        'workflow': jsonWorkflow,
        'committes': XMLdataY,
        'ministeries': XMLmenusMinisterio,
        'grupoPolitico': XMLGroupPolitico,
        'DocId': IdDocPeticao
    }

    #return render_to_response('docIniciativa.html', context, context_instance=RequestContext(request))
    return render(request, 'app/docIniciativa.html', context)
Ejemplo n.º 12
0
def getCommittesMembers(request, IdCommittes):
    x = SILPCache('cache')
    endereco = server.ServerEndereco('')
    XMLCommitte = x.getContent(endereco + 'getgroup/' + IdCommittes, 0)
    XMLdata = x.getContent(endereco + 'getcommitteemembers/1/9/' + IdCommittes,
                           0)
    XMLdataY = menus.getCommittesMenu(
        request)  #obtem dados do servi�o getcommittes
    XMLMenuMinisterio = menus.getMinisteriesMenu(request)
    XMLGroupPolitico = menus.getGruposMenu(request)
    TotalCountMember = getTotalNumberMemberCommittes(request, IdCommittes)

    context = {
        'Committee': XMLCommitte,
        'CommittesMembers': XMLdata,
        'feed': '',
        'committes': XMLdataY,
        'idComicao': IdCommittes,
        'ministeries': XMLMenuMinisterio,
        'grupoPolitico': XMLGroupPolitico,
        'TotalCountMember': TotalCountMember
    }
    #return render_to_response('CommittesMembers.html', context, context_instance=RequestContext(self))
    return render(request, 'app/CommittesMembers.html', context)