Lang: html
Get the source!
Actions
Recent Pastes
forget about it (Wu septiembre 02, 2010 at 18:04)
a traceback of a django error (Wu agosto 20, 2010 at 17:54)
some magic ACL code (Wu agosto 17, 2010 at 17:45)
some django models diff (Wu agosto 16, 2010 at 18:39)
some django-south tests (Wu agosto 16, 2010 at 18:42)
django add/edit revisited (Wu agosto 13, 2010 at 10:39)
django edd/edit (rsk agosto 13, 2010 at 10:40)
django model revisited (Wu agosto 12, 2010 at 20:15)
django (rs agosto 12, 2010 at 20:02)
rebuilding a GEOM mirror (Wu agosto 12, 2010 at 17:53)
About
This is the paste site from e-shell.org, my personal website. It is an instance of the CodeSharingZ Zope Product (just take a look at http://zopecode.codigo23.net/wiki/CodeSharingZ to learn more about it). Feel free to paste whatever you want, but notice that all the pastes in here are deleted in a regular basis.
Links
L html
(http://www.w3.org/MarkUp)

ZPT template

This template will render the results from the call to the previous ZSQLMEthod
  1 <html metal:use-macro="container/index_html/macros/page">
  2 
  3      <div id="contenedor_datos" metal:fill-slot="page_data">
  4 
  5       <form name="alta_caso_cliente" action="#" 
  6             tal:attributes="action python: test(getattr(context, 'id_cliente', None), context.absolute_url() + '/UpdateData',  
  7 context.absolute_url() + '/SaveData')"
  8             method="post" >
  9 
 10        <input type="hidden" name="id" value="" tal:attributes="value python: getattr(context, 'id', '')">
 11        <input type="hidden" name="id_cliente" value="" tal:attributes="value python: getattr(context, 'id_cliente', getattr(co 
 12 ntext, 'id', ''))">
 13        <input type="hidden" name="datatype" value="caso_cliente">
 14 
 15        <table>
 16 
 17         <tr>
 18          <td colspan="2">
 19           <b>NOTA:</b> Has de ir cubriendo los datos <b>por orden</b>, de <b>arriba hacia abajo</b>, de forma que para poder 
 20           seleccionar un <b>tipo de caso</b>, has de seleccionar <b>primero un juzgado</b>, etc
 21          </td>
 22         </tr>
 23 
 24         <tr><td>&nbsp;</td><td>&nbsp;</td></tr>        
 25 
 26         <tr tal:condition="python: getattr(request, 'tce', None) == 'nojgd'">
 27          <td colspan="2" class="aviso_nook">
 28           NO PUEDES SELECCIONAR UN TIPO DE CASO SIN SELECCIONAR UN JUZGADO PRIMERO
 29          </td>
 30         </tr>
 31 
 32         <tr tal:condition="python: getattr(request, 'tce', None) == 'nojgd'"><td>&nbsp;</td><td>&nbsp;</td></tr>        
 33 
 34         <tr tal:condition="python: getattr(request, 'pe', None) == 'nojgd'">
 35          <td colspan="2" class="aviso_nook">
 36           NO PUEDES SELECCIONAR UN PROCURADOR SIN SELECCIONAR UN JUZGADO PRIMERO
 37          </td>
 38         </tr>
 39 
 40         <tr tal:condition="python: getattr(request, 'pe', None) == 'nojgd'"><td>&nbsp;</td><td>&nbsp;</td></tr>        
 41 
 42         <tr tal:condition="python: getattr(request, 'su', None) == 'ok'">
 43          <td colspan="2" class="aviso_ok">
 44           LOS DATOS HAN SIDO ALMACENADOS CORRECTAMENTE
 45          </td>
 46         </tr>
 47 
 48         <tr tal:condition="python: getattr(request, 'su', None) == 'ok'"><td>&nbsp;</td><td>&nbsp;</td></tr>        
 49 
 50         <tr>
 51          <td>Cliente: <a href="" tal:attributes="href python: context.absolute_url() + '/GetClientById/' + str(getattr(context 
 52 , 'id_cliente', getattr(context, 'id', ''))) + '/FichaCliente'" tal:content="structure python: '<b>' + getattr(context, 'nombr 
 53 ec', getattr(context, 'nombre', '')) + '</b>'"></a></td>
 54          <td align="left">
 55           Caso cerrado: 
 56           <input type="checkbox" name="cerrado" checked tal:condition="python: getattr(context, 'cerrado', None)">
 57           <input type="checkbox" name="cerrado" tal:condition="python: not getattr(context, 'cerrado', None)">
 58          </td>
 59          <td></td>
 60         </tr>      
 61 
 62         <tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>
 63 
 64         <tr>
 65          <td>
 66           Juzgado: 
 67          </td>
 68          <td>
 69           <select name=juzgado onChange="SetCourtFilter()">
 70            <option value="0">Selecciona juzgado</option> 
 71            <span tal:repeat="juzgado python: context.ListCourts()" tal:omit-tag="">
 72             <option value="" selected tal:attributes="value juzgado/id" tal:content="juzgado/nombre_juzgado" tal:condition="py 
 73 thon: not getattr(request, 'jgd', False) and juzgado.nombre_juzgado == getattr(context, 'nombre_juzgado', '')">juzgado</option 
 74 >
 75 
 76             <option value="" selected tal:attributes="value juzgado/id" tal:content="juzgado/nombre_juzgado" tal:condition="python: str(juzgado.id) == str(getattr(request, 'jgd', ''))">juzgado</option>
 77 
 78             <option value="" tal:attributes="value juzgado/id" tal:content="juzgado/nombre_juzgado" tal:condition="python: get 
 79 attr(request, 'jgd', False) and str(juzgado.id) != str(getattr(request, 'jgd', '')) and juzgado.nombre_juzgado == getattr(cont 
 80 ext, 'nombre_juzgado', '')">juzgado</option>
 81 
 82             <option value="" tal:attributes="value juzgado/id" tal:content="juzgado/nombre_juzgado" tal:condition="python: str 
 83 (juzgado.id) != str(getattr(request, 'jgd', '')) and juzgado.nombre_juzgado != getattr(context, 'nombre_juzgado', '')">juzgado 
 84 </option>
 85            </span>
 86           </select>
 87          </td>
 88          <td><a href="" class="enlace_boton" tal:attributes="href python: context.absolute_url() + '/FichaJuzgado'">Nuevo</a>< 
 89 /td>
 90         </tr>
 91 
 92         <tr>
 93          <td>
 94           Procurador: 
 95          </td>
 96          <td>
 97           <select name=procurador onChange="SetProcuFilter()" tal:condition="python: not getattr(request, 'jgd', False) and no 
 98 t getattr(request, 'pcd', False)">
 99            <option value="--">Selecciona procurador</option>
100            <span tal:repeat="procurador python: context.ListProcu()" tal:omit-tag="">
101             <option value="" selected tal:attributes="value procurador/id" tal:content="procurador/nombre_procurador" tal:cond 
102 ition="python: procurador.nombre_procurador == getattr(context, 'nombre_procurador', '')">procurador</option>
103             <option value="" tal:attributes="value procurador/id" tal:content="procurador/nombre_procurador" tal:condition="py 
104 thon: procurador.nombre_procurador != getattr(context, 'nombre_procurador', '')">procurador</option>
105            </span>
106           </select>
107 
108           <select name=procurador onChange="SetProcuFilter()" tal:condition="python: getattr(request, 'jgd', False) and not ge 
109 tattr(request, 'pcd', False)">
110            <span tal:define="juzgado python: context.GetCourtById(juzgado_id=getattr(request, 'jgd', 0))">
111            <option value="--">Selecciona procurador</option>
112            <span tal:repeat="procurador python: context.ListProcu()" tal:omit-tag="">
113             <option value="" selected tal:attributes="value procurador/id" tal:content="procurador/nombre_procurador" tal:cond 
114 ition="python: procurador.nombre_procurador == juzgado[0][6] or procurador.nombre_procurador == getattr(context, 'nombre_procu 
115 rador', '')">procurador</option>
116             <option value="" tal:attributes="value procurador/id" tal:content="procurador/nombre_procurador" tal:condition="py 
117 thon: procurador.nombre_procurador != juzgado[0][6] and procurador.nombre_procurador != getattr(context, 'nombre_procurador',  
118 '')">tipo</option>
119            </span>
120            </span>
121           </select>
122 
123           <select name=procurador onChange="SetProcuFilter()" tal:condition="python: getattr(request, 'pcd', False)">
124            <option value="--">Selecciona procurador</option>
125            <span tal:repeat="procurador python: context.ListProcu()" tal:omit-tag="">
126             <option value="" selected tal:attributes="value procurador/id" tal:content="procurador/nombre_procurador" tal:cond 
127 ition="python: str(procurador.id) == getattr(request, 'pcd', '0')">procurador</option>
128             <option value="" tal:attributes="value procurador/id" tal:content="procurador/nombre_procurador" tal:condition="py 
129 thon: str(procurador.id) != getattr(request, 'pcd', '0')">tipo</option>
130            </span>
131           </select>
132           </td>
133          <td><a href="" class="enlace_boton" tal:attributes="href python: context.absolute_url() + '/FichaProcurador'">Nuevo</ 
134 a></td>
135         </tr>
136 
137         <tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>
138 
139         <tr>
140          <td>
141           Tipo:
142          </td>
143          <td> 
144           <select name=tipo_caso onChange="SetCaseTypeFilter()">
145            <option value="0">Selecciona tipo</option> 
146            <span tal:repeat="tipo python: context.ListCaseTypes()" tal:omit-tag="">
147             <option value="" selected tal:attributes="value tipo/id" tal:content="tipo/tipo" tal:condition="python: not getatt 
148 r(request, 'tc', False) and tipo.tipo == getattr(context, 'tipo', '')">tipo</option>
149 
150             <option value="" selected tal:attributes="value tipo/id" tal:content="tipo/tipo" tal:condition="python: str(tipo.i 
151 d) == str(getattr(request, 'tc', ''))">tipo</option>
152 
153             <option value="" tal:attributes="value tipo/id" tal:content="tipo/tipo" tal:condition="python: getattr(request, 't 
154 c', False) and str(tipo.id) != str(getattr(request, 'tc', '')) and tipo.tipo == getattr(context, 'tipo', '')">tipo</option>
155 
156             <option value="" tal:attributes="value tipo/id" tal:content="tipo/tipo" tal:condition="python: str(tipo.id) != str 
157 (getattr(request, 'tc', '')) and tipo.tipo != getattr(context, 'tipo', '')">tipo</option>
158            </span>
159           </select>     
160          </td>
161          <td> 
162           <a href="" class="enlace_boton" tal:attributes="href python: context.absolute_url() + '/FichaTipoCaso'">Nuevo</a>
163          </td>
164         </tr>
165 
166         <tr>
167          <td>
168           Subtipo: 
169          </td>
170          <td>
171           
172           <select name=subtipo_caso onChange="SetCaseSubTypeFilter()" tal:condition="python: not getattr(request, 'stc', False 
173 ) and not getattr(context, 'subtipo', '')">
174            <option value="0">Selecciona subtipo</option> 
175            <span tal:repeat="subtipo python: context.GetCaseSubTypeByType(tipo_caso_id=getattr(request, 'tc', 0))" tal:omit-ta 
176 g="">
177             <option value="" tal:attributes="value subtipo/id" tal:content="subtipo/subtipo">subtipo</option>
178            </span>
179           </select>
180 
181           <select name=subtipo_caso onChange="SetCaseSubTypeFilter()" tal:condition="python: not getattr(request, 'stc', False 
182 ) and getattr(context, 'subtipo', '')">
183            <option value="0">Selecciona subtipo</option> 
184            <span tal:repeat="subtipo python: context.GetCaseSubTypeByType(tipo_caso_id=getattr(request, 'tc', getattr(context, 
185  'tipo_id', 0)))" tal:omit-tag="">
186             <option value="" selected tal:attributes="value subtipo/id" tal:content="subtipo/subtipo" tal:condition="python: not getattr(request, 'tc', False) and subtipo.subtipo == getattr(context, 'subtipo', '')">subtipo</option>
187             <option value="" tal:attributes="value subtipo/id" tal:content="subtipo/subtipo" tal:condition="python: getattr(re 
188 quest, 'tc', False) and subtipo.subtipo == getattr(context, 'subtipo', '')">subtipo</option>
189             <option value="" tal:attributes="value subtipo/id" tal:content="subtipo/subtipo" tal:condition="python: subtipo.su 
190 btipo != getattr(context, 'subtipo', '')">subtipo</option>
191            </span>
192           </select>
193 
194           <select name=subtipo_caso onChange="SetCaseSubTypeFilter()" tal:condition="python: getattr(request, 'stc', False) an 
195 d getattr(context, 'tipo', False) and not getattr(request, 'tc', False) and getattr(context, 'id_cliente', False)">
196            <option value="0">Selecciona subtipo</option> 
197            <span tal:repeat="subtipo python: context.GetCaseSubTypeByType(tipo_caso_id=getattr(context, 'tipo_id', 0))" tal:om 
198 it-tag="">
199             <option value="" selected tal:attributes="value subtipo/id" tal:content="subtipo/subtipo" tal:condition="python: s 
200 tr(subtipo.id) == str(getattr(request, 'stc', ''))">subtipo</option>
201             <option value="" tal:attributes="value subtipo/id" tal:content="subtipo/subtipo" tal:condition="python: str(subtip 
202 o.id) != str(getattr(request, 'stc', ''))">subtipo</option>
203            </span>
204           </select>
205 
206           <select name=subtipo_caso onChange="SetCaseSubTypeFilter()" tal:condition="python: getattr(request, 'stc', False) an 
207 d getattr(context, 'tipo', False) and getattr(request, 'tc', False) and getattr(context, 'id_cliente', False)">
208            <option value="0">Selecciona subtipo</option> 
209            <span tal:repeat="subtipo python: context.GetCaseSubTypeByType(tipo_caso_id=getattr(request, 'tc', 0))" tal:omit-ta 
210 g="">
211             <option value="" selected tal:attributes="value subtipo/id" tal:content="subtipo/subtipo" tal:condition="python: s 
212 tr(subtipo.id) == str(getattr(request, 'stc', ''))">subtipo</option>
213             <option value="" tal:attributes="value subtipo/id" tal:content="subtipo/subtipo" tal:condition="python: str(subtip 
214 o.id) != str(getattr(request, 'stc', ''))">subtipo</option>
215            </span>
216           </select>
217           
218           <select name=subtipo_caso onChange="SetCaseSubTypeFilter()" tal:condition="python: getattr(request, 'stc', False) an 
219 d not getattr(context, 'id_cliente', False)">
220            <option value="0">Selecciona subtipo</option> 
221            <span tal:repeat="subtipo python: context.ListCaseSubTypes()" tal:omit-tag="">
222             <option value="" selected tal:attributes="value subtipo/id" tal:content="subtipo/subtipo" tal:condition="python: s 
223 tr(subtipo.id) == str(getattr(request, 'stc', ''))">subtipo</option>
224             <option value="" tal:attributes="value subtipo/id" tal:content="subtipo/subtipo" tal:condition="python: str(subtip 
225 o.id) != str(getattr(request, 'stc', ''))">subtipo</option>
226            </span>
227           </select>
228 
229          </td>
230          <td>
231            <a href="" class="enlace_boton" tal:attributes="href python: context.absolute_url() + '/FichaSubTipoCaso'">Nuevo</a 
232 >
233          </td>
234         </tr>      
235 
236         <tr>
237          <td>
238           Procedimiento:
239          </td>
240          <td>
241           <select name=procedimiento_caso tal:condition="python: not getattr(request, 'stc', False) and not getattr(context, ' 
242 procedimiento', False)">
243            <option value="0">Selecciona procedimiento</option> 
244           </select>
245           <select name=procedimiento_caso tal:condition="python: not getattr(request, 'stc', False) and getattr(context, 'proc 
246 edimiento', False)">
247            <option value="0">Selecciona procedimiento</option> 
248            <span tal:repeat="proc python: context.GetCaseProcBySubType(subtipo_id=getattr(context, 'subtipo_id', 0))" tal:cond 
249 ition="python: not getattr(request, 'tc', False)" tal:omit-tag="">
250             <option value="" selected tal:attributes="value proc/id" tal:content="proc/procedimiento" tal:condition="python: p 
251 roc.procedimiento == getattr(context, 'procedimiento', '')">procedimiento</option>
252             <option value="" tal:attributes="value proc/id" tal:content="proc/procedimiento" tal:condition="python: proc.proce 
253 dimiento != getattr(context, 'procedimiento', '')">procedimiento</option>
254            </span>      
255           </select>
256 
257           <select name=procedimiento_caso tal:condition="python: getattr(request, 'stc', False)">
258            <option value="0">Selecciona procedimiento</option> 
259            <span tal:repeat="proc python: context.GetCaseProcBySubType(subtipo_id=getattr(request, 'stc', 0))" tal:omit-tag="" 
260 >
261             <option value="" selected tal:attributes="value proc/id" tal:content="proc/procedimiento" tal:condition="python: p 
262 roc.procedimiento == getattr(context, 'procedimiento', '')">procedimiento</option>
263             <option value="" tal:attributes="value proc/id" tal:content="proc/procedimiento" tal:condition="python: proc.proce 
264 dimiento != getattr(context, 'procedimiento', '')">procedimiento</option>
265            </span>
266           </select>
267          </td>
268          <td>
269           <a href="" class="enlace_boton" tal:attributes="href python: context.absolute_url() + '/FichaProcedimientoCaso'">Nue 
270 vo</a>
271          </td>
272          <td>
273          </td>
274         </tr>
275 
276         <tr>
277          <td>
278           Parte contraria: 
279          </td>
280          <td>
281           <select name=parte_contraria>
282            <option value="0">Selecciona parte contraria</option> 
283            <span tal:repeat="clientec python: context.ListContClient()" tal:omit-tag="">
284             <option value="" selected tal:attributes="value clientec/id" tal:content="clientec/nombre" tal:condition="python:  
285 clientec.nombre == getattr(context, 'nombrecc', '')">cliente contrario</option>
286             <option value="" tal:attributes="value clientec/id" tal:content="clientec/nombre" tal:condition="python: clientec. 
287 nombre != getattr(context, 'nombrecc', '')">cliente contrario</option>
288            </span>
289           </select>
290          </td>
291          <td> 
292            <a href="" class="enlace_boton" tal:attributes="href python: context.absolute_url() + '/FichaClienteContrario'">Nue 
293 vo</a>
294          </td>
295         </tr>
296         <tr>
297          <td>
298           Abogado contrario: 
299          </td>
300          <td>
301           <select name=abogado_contrario>
302            <option value="0">Selecciona abogado contrario</option> 
303            <span tal:repeat="abogadoc python: context.ListContLawyer()" tal:omit-tag="">
304             <option value="" selected tal:attributes="value abogadoc/id" tal:content="abogadoc/nombre" tal:condition="python:  
305 abogadoc.nombre == getattr(context, 'nombreac', '')">abogado contrario</option>
306             <option value="" tal:attributes="value abogadoc/id" tal:content="abogadoc/nombre" tal:condition="python: abogadoc. 
307 nombre != getattr(context, 'nombreac', '')">abogado contrario</option>
308            </span>
309           </select>
310          </td>
311          <td> 
312            <a href="" class="enlace_boton" tal:attributes="href python: context.absolute_url() + '/FichaAbogadoContrario'">Nue 
313 vo</a>
314          </td>
315         </tr>
316 
317         <tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>
318 
319         <tr>
320         <td>
321           Acusación / Demandante: 
322           <input type="radio" name="acudef" value="t" checked="checked" tal:condition="python: getattr(context, 'acusacion', N 
323 one)">
324           <input type="radio" name="acudef" value="t" tal:condition="python: not getattr(context, 'acusacion', None)">
325          </td>
326          
327          <td align="left">
328           Defensa / Demandado: 
329           <input type="radio" name="acudef" value="f" checked="checked" tal:condition="python: not getattr(context, 'acusacion 
330 ', None)">
331           <input type="radio" name="acudef" value="f" tal:condition="python: getattr(context, 'acusacion', None)">
332          </td>
333          <td></td>
334         </tr>
335 
336         <tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>
337 
338         <tr>
339          <td>
340           Num. Autos:
341          </td>
342          <td>
343           <input type="text" class="campo" name="num_autos" value="" size="15" maxlength="20" tal:attributes="value python: ge 
344 tattr(context, 'num_autos', '')">
345          </td>
346          <td>
347          </td>
348         </tr>
349         <tr>
350          <td>
351           Ref: 
352          </td>
353          <td>
354           <input type="text" class="campo" name="referencia" value="" size="15" maxlength="20" tal:attributes="value python: g 
355 etattr(context, 'referencia', '')">
356          </td>
357          <td>
358          </td>
359         </tr>
360 
361         <tr>
362          <td>
363           Archivo: 
364          </td>
365          <td>
366           <input type="text" class="campo" name="num_archivo" value="" size="15" maxlength="20" tal:attributes="value python:  
367 getattr(context, 'num_archivo', '')">
368          </td>
369          <td>
370          </td>
371         </tr>
372 
373         <tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>
374 
375         <tr>
376          <td valign="top">Notas:</td>
377          <td colspan="2">
378           <textarea name="notas" cols="60" rows="8" class="nullfields" tal:content=" python: getattr(context, 'notas_caso', '' 
379 )">
380            Notas
381           </textarea>
382          </td>
383         </tr>
384 
385 
386         <tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>
387 
388         <tr>
389          <td align="left">
390           <a href="javascript:history.back()" class="boton_imagen"><img src="img/volver.gif" alt="Volver" /></a>
391          </td>
392          <td align="right" colspan=2>
393           <a href="#" class="boton_imagen" tal:attributes="href request/HTTP_REFERER" tal:condition="python: 'ListadoCasosActi 
394 vos' in request.HTTP_REFERER or 'CasosCliente' in request.HTTP_REFERER"><img src="img/cancelar.gif" alt="Cancelar" /></a> 
395 
396           <a href="#" class="boton_imagen" tal:attributes="href python: context.absolute_url() + '/ListadoCasosActivos'" tal:c 
397 ondition="python: 'ListadoCasosActivos' not in request.HTTP_REFERER and 'CasosCliente' not in request.HTTP_REFERER"><img src=" 
398 img/cancelar.gif" alt="Cancelar" /></a> 
399           <input type="image" src="img/aceptar.gif" alt="Aceptar" class="boton_imagen" />
400          </td>
401         </tr>
402        </table>
403       </form>
404      </div>
405 
406 </html>
Pasted by Wu on marzo 04, 2010 at 16:53 | Lang: html | (407 lines of code)