Commit 0f3d95095633541d867d87eb583c778dffb9a287
1 parent
141d957b
Exists in
master
busca em todos os docs da base orgao
Showing
3 changed files
with
21 additions
and
3 deletions
Show diff stats
wscacicneo/model/orgao.py
... | ... | @@ -212,7 +212,10 @@ class Orgao(orgao_base.metaclass): |
212 | 212 | """ |
213 | 213 | Retorna todos os docs da base |
214 | 214 | """ |
215 | - results = self.documentrest.get_collection(limit=None) | |
215 | + search = Search( | |
216 | + limit=None | |
217 | + ) | |
218 | + results = self.documentrest.get_collection(search) | |
216 | 219 | |
217 | 220 | return results |
218 | 221 | ... | ... |
wscacicneo/templates/list_orgao.pt
... | ... | @@ -29,7 +29,7 @@ |
29 | 29 | </thead> |
30 | 30 | <tbody> |
31 | 31 | <tr> |
32 | - <td>Ministerio</td> | |
32 | + <td>${orgao_doc[0].nome}</td> | |
33 | 33 | <td>Ministerio</td> |
34 | 34 | <td>ministerio</td> |
35 | 35 | <td> ministerio</td> |
... | ... | @@ -51,5 +51,10 @@ |
51 | 51 | </div> |
52 | 52 | </metal:content> |
53 | 53 | <metal:content fill-slot="javascript"> |
54 | + <script type="text/javascript"> | |
55 | + $(document).ready(function(){ | |
56 | + alert('aaaaaaaaaaaaaa') | |
57 | + }); | |
58 | + </script> | |
54 | 59 | </metal:content> |
55 | 60 | </metal:main> | ... | ... |
wscacicneo/views.py
... | ... | @@ -88,7 +88,17 @@ def orgao(request): |
88 | 88 | |
89 | 89 | @view_config(route_name='listorgao', renderer='templates/list_orgao.pt') |
90 | 90 | def listorgao(request): |
91 | - return { } | |
91 | + orgao_obj = Orgao( | |
92 | + nome = 'sahuds', | |
93 | + cargo = 'cargo', | |
94 | + coleta = '4h', | |
95 | + sigla = 'MPOG', | |
96 | + endereco = 'Esplanada bloco C', | |
97 | + email = 'admin@planemaneto.gov.br', | |
98 | + telefone = '(61) 2025-4117' | |
99 | + ) | |
100 | + search = orgao_obj.search_list_orgaos() | |
101 | + return {'orgao_doc': search.results} | |
92 | 102 | |
93 | 103 | @view_config(route_name='config', renderer='templates/config.pt') |
94 | 104 | def config(request): | ... | ... |