Commit 027f18e89d6403e9a92c9ce116b934d5f4a9068d
1 parent
17faee8d
Exists in
master
configurção da url do banco de dados
Showing
3 changed files
with
31 additions
and
41 deletions
Show diff stats
wscacicneo/__init__.py
... | ... | @@ -45,6 +45,7 @@ def main(global_config, **settings): |
45 | 45 | config.add_route('editorgao', 'orgao/editar/{sigla}') |
46 | 46 | config.add_route('listorgao', 'orgao/lista') |
47 | 47 | config.add_route('delete_orgao', 'orgao/delete/{sigla}') |
48 | + config.add_route('base_de_dados', 'orgao/base/{sigla}') | |
48 | 49 | # |
49 | 50 | #Usuários |
50 | 51 | config.add_route('user', 'usuario/cadastro') | ... | ... |
... | ... | @@ -0,0 +1,28 @@ |
1 | +<metal:main use-macro="load: master.pt"> | |
2 | + <metal:content fill-slot="conteudo"> | |
3 | + <div class="padd"> | |
4 | + <br /> | |
5 | + <!-- Form starts. --> | |
6 | + <form class="form-horizontal" id="cadastrar_user" role="form"> | |
7 | + <div class="form-group"> | |
8 | + <label class="col-lg-2 control-label">URL da Base de Dados</label> | |
9 | + <div class="col-lg-5"> | |
10 | + <input type="text" id="url" class="form-control" placeholder="URL"> | |
11 | + </div> | |
12 | + <div class="col-lg-5"> | |
13 | + <button type="button" id="salvar" class="btn btn-sm btn-default">Salvar</button> | |
14 | + </div> | |
15 | + </div> | |
16 | + </form> | |
17 | + </div> | |
18 | + </metal:content> | |
19 | + <metal:content fill-slot="javascript"> | |
20 | + <script type="text/javascript"> | |
21 | + $('#salvar').click(function(){ | |
22 | + var data = { | |
23 | + 'url': $('#url').val() | |
24 | + } | |
25 | + }); | |
26 | + </script> | |
27 | + </metal:content> | |
28 | +</metal:main> | ... | ... |
wscacicneo/views.py
... | ... | @@ -146,46 +146,8 @@ def list(request): |
146 | 146 | def sobre(request): |
147 | 147 | return {'project': 'WSCacicNeo'} |
148 | 148 | |
149 | -#formularios de cadastro de coleta | |
150 | - | |
151 | -@view_config(route_name='computador', renderer='templates/computador.pt') | |
152 | -def computador(request): | |
153 | - return {'project': 'WSCacicNeo'} | |
154 | - | |
155 | -@view_config(route_name='processador', renderer='templates/processador.pt') | |
156 | -def proc(request): | |
157 | - return {'project': 'WSCacicNeo'} | |
158 | - | |
159 | -@view_config(route_name='memoria', renderer='templates/memoria.pt') | |
160 | -def memoria(request): | |
161 | - return {'project': 'WSCacicNeo'} | |
162 | - | |
163 | -@view_config(route_name='hd', renderer='templates/hd.pt') | |
164 | -def hd(request): | |
165 | - return {'project': 'WSCacicNeo'} | |
166 | - | |
167 | -@view_config(route_name='escritorio', renderer='templates/escritorio.pt') | |
168 | -def escritorio(request): | |
169 | - return {'project': 'WSCacicNeo'} | |
170 | - | |
171 | -@view_config(route_name='rede', renderer='templates/rede.pt') | |
172 | -def rede(request): | |
173 | - return {'project': 'WSCacicNeo'} | |
174 | - | |
175 | -@view_config(route_name='basico', renderer='templates/basico.pt') | |
176 | -def basico(request): | |
177 | - return {'project': 'WSCacicNeo'} | |
178 | - | |
179 | -@view_config(route_name='sistema', renderer='templates/sistema.pt') | |
180 | -def sistema(request): | |
181 | - return {'project': 'WSCacicNeo'} | |
182 | - | |
183 | -@view_config(route_name='bot', renderer='templates/bot.pt') | |
184 | -def bot(request): | |
185 | - return {'project': 'WSCacicNeo'} | |
186 | - | |
187 | -@view_config(route_name='configapi', renderer='templates/configapi.pt') | |
188 | -def configapi(request): | |
149 | +@view_config(route_name='base_de_dados', renderer='templates/base_dados.pt') | |
150 | +def base_de_dados(request): | |
189 | 151 | return {'project': 'WSCacicNeo'} |
190 | 152 | |
191 | 153 | @view_config(route_name='editorgao', renderer='templates/editarorgao.pt') |
... | ... | @@ -239,7 +201,6 @@ def confighome(request): |
239 | 201 | def db(request): |
240 | 202 | return {'project': 'WSCacicNeo'} |
241 | 203 | |
242 | - | |
243 | 204 | #URL Órgaos |
244 | 205 | |
245 | 206 | @view_config(route_name='post_orgao') | ... | ... |