Example #1
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)
Example #2
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)
Example #3
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)
Example #4
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)
Example #5
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)
Example #6
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)
Example #7
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)
Example #8
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)
Example #9
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)