<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-3350527338829175333</id><updated>2024-10-07T01:37:34.726-05:00</updated><category term="geek"/><category term="python"/><category term="ocio"/><category term="django"/><category term="web 2.0"/><category term="critica"/><category term="google"/><category term="webdev"/><category term="debian"/><category term="inteligencia artificial"/><category term="locombia"/><category term="mysql"/><category term="procrastination"/><category term="blender"/><category term="desktop"/><category term="gis"/><category term="mapserver"/><category term="musik"/><category term="nota mental"/><category term="openca"/><category term="postgis"/><category term="postgres"/><category term="pythoncolombia"/><category term="self"/><category term="zope"/><title type='text'>pyAutoservicio</title><subtitle type='html'>lo atendemos con amor...</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://pyautoservicio.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3350527338829175333/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://pyautoservicio.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/3350527338829175333/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08392322258019975226</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>43</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3350527338829175333.post-3203926112307589609</id><published>2009-09-22T01:18:00.000-05:00</published><updated>2009-09-22T01:18:47.739-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="geek"/><category scheme="http://www.blogger.com/atom/ns#" term="locombia"/><category scheme="http://www.blogger.com/atom/ns#" term="ocio"/><category scheme="http://www.blogger.com/atom/ns#" term="procrastination"/><category scheme="http://www.blogger.com/atom/ns#" term="python"/><title type='text'>Fotos de Soho v0.2</title><content type='html'>&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;Después de un tiempo, he realizado la versión 0.2 de un script para descargar las imagenes de soho que busca ser multiplataforma, hecho en python, depende de la libreria &lt;a href=&quot;http://www.pythonware.com/products/pil/&quot;&gt;PIL&lt;/a&gt;.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;Para usarlo hay que crear una carpeta y alli poner el script, luego ejecutarlo como:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;python2.5 soho.py&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;o&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;chmod a+x soho.py&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;./soho.py&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;Este es el código:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;#! /usr/bin/env python2.5&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;import os, sys&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;from urllib2 import Request, urlopen, URLError&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;from PIL import ImageFile&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;URL = &#39;http://www.soho.com.co/galerias_new/mod_&#39;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;MODELO_INICIO = 205&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;MODELO_FINAL = 577&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;flag_descargar = True&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;def make_request(full_url):&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;print &#39;Obteniendo imagen de %s &#39; % full_url&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;req = Request(full_url)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;try:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;response = urlopen(req)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;except URLError, e:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if hasattr(e, &#39;reason&#39;):&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print &#39;We failed to reach a server.&#39;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print &#39;Reason: &#39;, e.reason&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;elif hasattr(e, &#39;code&#39;):&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print &#39;The server couldn\&#39;t fulfill the request.&#39;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print &#39;Error code: &#39;, e.code&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;else:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return response&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;def save_image(response, name):&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&quot;La imagen&quot;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;parser = ImageFile.Parser()&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;parser.feed(response.read())&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;image = parser.close()&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;image.save(name)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;while flag_descargar:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&quot;&quot;&quot;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;TODO: mejorar los nombres de las carpetas y de los archivos&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&quot;&quot;&quot;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;NOMBRE_CARPETA = &#39;soho&#39;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;if 1 &amp;lt;= MODELO_INICIO &amp;lt; 10:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;NOMBRE_CARPETA+=&#39;000&#39;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;elif 10 &amp;lt;= MODELO_INICIO &amp;lt; 100:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;NOMBRE_CARPETA+=&#39;00&#39;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;elif 100 &amp;lt;= MODELO_INICIO &amp;lt; 1000:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;NOMBRE_CARPETA+=&#39;0&#39;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;NOMBRE_CARPETA+=str(MODELO_INICIO)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;if not os.path.exists(NOMBRE_CARPETA):&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;full_url = URL+str(MODELO_INICIO)+&#39;/f1.jpg&#39;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;response = make_request(full_url)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if response:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&quot;Esto se ejecuta si encuentra la primera foto&quot;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&quot;Crea la carpeta&quot;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;os.mkdir(NOMBRE_CARPETA)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;save_image(response, NOMBRE_CARPETA+&#39;/f1.jpg&#39;)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&quot;Guarda el resto de imagenes&quot;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;contador = 2&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;while True:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;full_url = &quot;%s%s/f%s.jpg&quot; % (URL,str(MODELO_INICIO),str(contador))&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;response = make_request(full_url)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if response:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;nombre_foto = &#39;%s/f%s.jpg&#39; % (NOMBRE_CARPETA, contador)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;save_image(response, nombre_foto)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;contador += 1&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;else:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;break&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;else:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;MODELO_INICIO += 1&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;else:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print &quot;YA EXISTE LA CARPETA %s&quot; % NOMBRE_CARPETA&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if MODELO_INICIO &amp;lt;= MODELO_FINAL:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;MODELO_INICIO += 1&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;else:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;flag_descargar = False&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pyautoservicio.blogspot.com/feeds/3203926112307589609/comments/default' title='Comentarios de la entrada'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3350527338829175333/3203926112307589609?isPopup=true' title='0 Comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3350527338829175333/posts/default/3203926112307589609'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3350527338829175333/posts/default/3203926112307589609'/><link rel='alternate' type='text/html' href='http://pyautoservicio.blogspot.com/2009/09/fotos-de-soho-v02.html' title='Fotos de Soho v0.2'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08392322258019975226</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3350527338829175333.post-7192950568167848003</id><published>2009-08-30T21:49:00.000-05:00</published><updated>2009-08-30T21:49:35.745-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="debian"/><category scheme="http://www.blogger.com/atom/ns#" term="django"/><category scheme="http://www.blogger.com/atom/ns#" term="gis"/><category scheme="http://www.blogger.com/atom/ns#" term="postgis"/><category scheme="http://www.blogger.com/atom/ns#" term="postgres"/><category scheme="http://www.blogger.com/atom/ns#" term="web 2.0"/><category scheme="http://www.blogger.com/atom/ns#" term="webdev"/><title type='text'>Primeros pasos con geodjango</title><content type='html'>&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Este es un minitutorial &quot;expreso&quot; para probar geodjango en debian testing con postgres 8.3, postgis y django 1.1&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Pues lo primero es instalar los &quot;juguetes&quot;:&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;$ apt-get install postgis postgresql-8.3 postgresql-plpython-8.3&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;$ apt-get install python2.5 python-psycopg2 python-django ipython&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;$ apt-get install gdal-bin python-gdal &lt;/span&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Ahora debemos configurar un poco postgres asi:&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Debemos volvernos root y luego el usuario postgres&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;$ su&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;$ su postrgres&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;$ psql template1&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Este úlrimo comando nos conecta a postgres como el usuario postgres (el root del servidor de bases de datos), luego configuramos una plantilla para postigs (esto lo hacemos una sola vez)&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;template1=#  ALTER USER postgres WITH &lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt; PASSWORD &#39;postgres&#39;;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;ALTER ROLE&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Template1=#&amp;nbsp; \q&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Luego:&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;$ cd /tmp&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;$ wget http://geodjango.org/docs/create_template_postgis-debian.sh&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;$ bash create_template_postgis-debian.sh&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Esto nos crea la plantilla template_postgis, ahora volvemos a postgres:&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt; &lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;$ createdb -T template_postgis geodjango&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Salimos de postgres y del usuario root.&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Ahora creamos un projecto y la app:&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;$ djano-admin startproject geodjango&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;/div&gt;&lt;pre style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;$ cd geodjango
$ python manage.py startapp world&lt;/span&gt;&lt;/pre&gt;&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; &lt;/div&gt;&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Luego editamos el settings de nuestro proyecto con el editor de nuestra preferencia (sugerencia rapida gedit)&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;$ gedit settings.py &amp;amp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Dejamos las siguientes variables así &lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;DATABASE_ENGINE = &#39;postgresql_psycopg2&#39;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;DATABASE_NAME = &#39;geodjango&#39;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Or path to database file if using sqlite3.&lt;br /&gt;
DATABASE_USER = &#39;postgres&#39;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Not used with sqlite3.&lt;br /&gt;
DATABASE_PASSWORD = &#39;postgres&#39;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Not used with sqlite3.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;DATABASE_HOST = &#39;localhost&#39;&lt;br /&gt;
LANGUAGE_CODE = &#39;es&#39;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;INSTALLED_APPS = (&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &#39;django.contrib.auth&#39;,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &#39;django.contrib.contenttypes&#39;,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &#39;django.contrib.sessions&#39;,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &#39;django.contrib.sites&#39;,&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span class=&quot;s&quot;&gt;&#39;django.contrib.admin&#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;pre style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;  &lt;span class=&quot;s&quot;&gt;  &#39;django.contrib.gis&#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
  &lt;span class=&quot;s&quot;&gt;  &#39;geodjango.world&#39;&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;)&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;luego de guardar estos cambios:&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;$ mkdir world/data&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;pre style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;$ cd world/data
$ wget http://thematicmapping.org/downloads/TM_WORLD_BORDERS-0.3.zip
$ unzip TM_WORLD_BORDERS-0.3.zip
$ cd ../..&lt;/span&gt;&lt;/pre&gt;&lt;pre style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Luego editamos otro archivo:&lt;/span&gt;&lt;/pre&gt;&lt;pre style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;$ gedit world/models.py &amp;amp;&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;kn&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;from&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nn&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;django.contrib.gis.db&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kn&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;models&lt;/span&gt;

&lt;span class=&quot;k&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nc&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;WorldBorders&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;models&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;Model&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;):&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;c&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;# Regular Django fields corresponding to the attributes in the&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;c&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;# world borders shapefile.&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;models&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;CharField&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;max_length&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mf&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;50&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;)&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;area&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;models&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;IntegerField&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;()&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;pop2005&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;models&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;IntegerField&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&#39;Population 2005&#39;&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;)&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;fips&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;models&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;CharField&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&#39;FIPS Code&#39;&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;max_length&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mf&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;)&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;iso2&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;models&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;CharField&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&#39;2 Digit ISO&#39;&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;max_length&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mf&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;)&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;iso3&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;models&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;CharField&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&#39;3 Digit ISO&#39;&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;max_length&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mf&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;)&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;un&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;models&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;IntegerField&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&#39;United Nations Code&#39;&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;)&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;region&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;models&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;IntegerField&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&#39;Region Code&#39;&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;)&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;subregion&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;models&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;IntegerField&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&#39;Sub-Region Code&#39;&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;)&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;lon&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;models&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;FloatField&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;()&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;lat&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;models&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;FloatField&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;()&lt;/span&gt;

&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;c&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;# GeoDjango-specific: a geometry field (MultiPolygonField), and&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;c&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;# overriding the default manager with a GeoManager instance.&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;mpoly&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;models&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;MultiPolygonField&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;()&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;objects&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;models&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;GeoManager&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;()&lt;/span&gt;

&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;c&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;# So the model is pluralized correctly in the admin.&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;k&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nc&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;Meta&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;:&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;        &lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;verbose_name_plural&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&quot;World Borders&quot;&lt;/span&gt;

&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;c&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;# Returns the string representation of the model.&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;k&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;def&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nf&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;__unicode__&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;bp&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;):&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;        &lt;/span&gt;&lt;span class=&quot;k&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;bp&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;name&lt;/span&gt;
&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Luego vemos que todo vaya bien:&lt;/span&gt;&lt;/pre&gt;&lt;pre style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;$ ./manage.py sqlall world &lt;/span&gt;&lt;/pre&gt;&lt;pre style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;
&lt;/span&gt;&lt;/pre&gt;&lt;pre style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Esto nos mostrara el sql de postgres para crear nuestro modelo:&lt;/span&gt;&lt;/pre&gt;&lt;pre style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;BEGIN;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;CREATE TABLE &quot;world_worldborders&quot; (&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;    &quot;id&quot; serial NOT NULL PRIMARY KEY,&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;    &quot;name&quot; varchar(50) NOT NULL,&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;    &quot;area&quot; integer NOT NULL,&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;    &quot;pop2005&quot; integer NOT NULL,&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;    &quot;fips&quot; varchar(2) NOT NULL,&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;    &quot;iso2&quot; varchar(2) NOT NULL,&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;    &quot;iso3&quot; varchar(3) NOT NULL,&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;    &quot;un&quot; integer NOT NULL,&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;    &quot;region&quot; integer NOT NULL,&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;    &quot;subregion&quot; integer NOT NULL,&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;    &quot;lon&quot; double precision NOT NULL,&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;    &quot;lat&quot; double precision NOT NULL&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;)&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;SELECT AddGeometryColumn(&#39;world_worldborders&#39;, &#39;mpoly&#39;, 4326, &#39;MULTIPOLYGON&#39;, 2);&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;ALTER TABLE &quot;world_worldborders&quot; ALTER &quot;mpoly&quot; SET NOT NULL;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;CREATE INDEX &quot;world_worldborders_mpoly_id&quot; ON &quot;world_worldborders&quot; USING GIST ( &quot;mpoly&quot; GIST_GEOMETRY_OPS );&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;COMMIT;&lt;/span&gt;
&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Luego ejecutamos este sql:&lt;/span&gt;&lt;/pre&gt;&lt;pre style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;$ ./manage.py syncdb&lt;/span&gt;&lt;/pre&gt;&lt;pre style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt; 
&lt;/span&gt;&lt;/pre&gt;&lt;pre style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Lo que nos preguntara el usuario admin, su correo y la clave de acceso:&lt;/span&gt;&lt;/pre&gt;&lt;pre style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Creating table auth_permission
Creating table auth_group
Creating table auth_user
Creating table auth_message
Creating table django_content_type
Creating table django_session
Creating table django_site
Creating table django_admin_log
Creating table world_worldborders

You just installed Django&#39;s auth system, which means you don&#39;t have any superusers defined.
Would you like to create one now? (yes/no): yes
Username (Leave blank to use &#39;diegueus9&#39;): &lt;span style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&amp;lt;- Toma el usuario con el que estes haciendo esto&lt;/span&gt;
E-mail address:  &lt;span style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&amp;lt;- Escribe tu correo&lt;/span&gt;
Password:
Password (again):
Superuser created successfully.
Installing custom SQL for world.WorldBorders model
Installing index for auth.Permission model
Installing index for auth.Message model
Installing index for admin.LogEntry model &lt;/span&gt;&lt;/pre&gt;&lt;pre style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;
&lt;/span&gt;&lt;/pre&gt;&lt;pre style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Luego creamos un scrip que cargará los datos de los archivos que descargamos:&lt;/span&gt;&lt;/pre&gt;&lt;pre style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;$ gedit world/load.py&lt;/span&gt;&lt;/pre&gt;&lt;pre style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;kn&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nn&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;os&lt;/span&gt;
&lt;span class=&quot;kn&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;from&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nn&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;django.contrib.gis.utils&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kn&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;LayerMapping&lt;/span&gt;
&lt;span class=&quot;kn&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;from&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nn&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;models&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kn&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;WorldBorders&lt;/span&gt;

&lt;span class=&quot;n&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;world_mapping&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;{&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&#39;fips&#39;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&#39;FIPS&#39;&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;,&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&#39;iso2&#39;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&#39;ISO2&#39;&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;,&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&#39;iso3&#39;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&#39;ISO3&#39;&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;,&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&#39;un&#39;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&#39;UN&#39;&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;,&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&#39;name&#39;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&#39;NAME&#39;&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;,&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&#39;area&#39;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&#39;AREA&#39;&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;,&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&#39;pop2005&#39;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&#39;POP2005&#39;&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;,&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&#39;region&#39;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&#39;REGION&#39;&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;,&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&#39;subregion&#39;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&#39;SUBREGION&#39;&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;,&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&#39;lon&#39;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&#39;LON&#39;&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;,&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&#39;lat&#39;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&#39;LAT&#39;&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;,&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&#39;mpoly&#39;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&#39;MULTIPOLYGON&#39;&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;,&lt;/span&gt;
&lt;span class=&quot;p&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;n&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;world_shp&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;os&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;path&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;abspath&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;os&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;path&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;join&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;os&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;path&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;dirname&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;__file__&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;),&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&#39;data/TM_WORLD_BORDERS-0.3.shp&#39;&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;))&lt;/span&gt;

&lt;span class=&quot;k&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;def&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nf&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;run&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;verbose&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;bp&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;True&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;):&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;lm&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;LayerMapping&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;WorldBorders&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;world_shp&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;world_mapping&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;,&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;                      &lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;transform&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;bp&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;False&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;encoding&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&#39;iso-8859-1&#39;&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;)&lt;/span&gt;

&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;lm&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;save&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;strict&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;bp&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;True&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;verbose&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;verbose&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;)&lt;/span&gt;
&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Ahora lo que vamos a hacer es subir la info de las fronteras de los paises del mundo a nuestro modelo:&lt;/span&gt;&lt;/pre&gt;&lt;pre style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;$ ./manage shell&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; font-size: small;&quot;&gt;Python 2.5.4 (r254:67916, Feb 18 2009, 03:00:47)&lt;br /&gt;
Type &quot;copyright&quot;, &quot;credits&quot; or &quot;license&quot; for more information.&lt;br /&gt;
&lt;br /&gt;
IPython 0.9.1 -- An enhanced Interactive Python.&lt;br /&gt;
?&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -&amp;gt; Introduction and overview of IPython&#39;s features.&lt;br /&gt;
%quickref -&amp;gt; Quick reference.&lt;br /&gt;
help&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -&amp;gt; Python&#39;s own help system.&lt;br /&gt;
object?&amp;nbsp;&amp;nbsp; -&amp;gt; Details about &#39;object&#39;. ?object also works, ?? prints more.&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;pre style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;In [1]: from world import load

In [2]: load.run()&lt;/span&gt;&lt;/pre&gt;&lt;pre style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;/pre&gt;&lt;pre style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;...&lt;/span&gt;&lt;/pre&gt;&lt;pre style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;...&lt;/span&gt;&lt;/pre&gt;&lt;pre style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;...&lt;/span&gt;&lt;/pre&gt;&lt;pre style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Saved: Jersey
Saved: South Georgia South Sandwich Islands
Saved: Taiwan

In [3]: exit()
&lt;/span&gt;&lt;/pre&gt;&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Do you really want to exit ([y]/n)? y&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Ahora vamos a activar y usar nuestra interfaz automagica administrativa que nos da django:&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;$ gedit world/admin.py &amp;amp;&lt;/span&gt;&lt;/div&gt;&lt;pre style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;kn&quot;&gt;from django.contrib.gis import admin
from models import WorldBorders

class WorldBordersAdmin(admin.GeoModelAdmin):
    list_display = [&#39;name&#39;, &#39;area&#39;, &#39;pop2005&#39;, &#39;lon&#39;, &#39;lat&#39;]
    search_fields = [&#39;name&#39;]

admin.site.register(WorldBorders, WorldBordersAdmin)&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Y luego editamos las urls:&lt;/span&gt;&lt;/pre&gt;&lt;pre style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;$ gedit urls.py &amp;amp;&lt;/span&gt;&lt;/pre&gt;&lt;pre style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;from django.conf.urls.defaults import *
from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns(&#39;&#39;,
    (r&#39;^admin/&#39;, include(admin.site.urls)),
)&lt;/span&gt;&lt;/pre&gt;&lt;pre style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;
&lt;/span&gt;&lt;/pre&gt;&lt;pre style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Ahora ponemos a correr nuestro servidor de desarrollo:&lt;/span&gt;&lt;/pre&gt;&lt;pre style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;$ ./manage runserver 9090&lt;/span&gt;&lt;/pre&gt;&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Validating models...&lt;br /&gt;
0 errors found&lt;br /&gt;
&lt;br /&gt;
Django version 1.1, using settings &#39;geodjango.settings&#39;&lt;br /&gt;
Development server is running at http://127.0.0.1:9090/&lt;br /&gt;
Quit the server with CONTROL-C.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Y en el navegador vamos a&amp;nbsp; &lt;a href=&quot;http://127.0.0.1:9090/&quot;&gt;http://127.0.0.1:9090/&lt;/a&gt; veremos un error 404 como este:&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; font-family: Arial,Helvetica,sans-serif; text-align: center;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3g_tnyVhkrLVZWQjFckBD7VHcmVLLi_ndJRecBG1pxvD55Dip3tNTCiH-IHFRwNhdHMdkaG0VrjpSAuaP6Ltka6TKf2XE_c-jK5RzdojMHWXhNTQQSG6fbc6N7se3iCkJ4zDneYGtbsD6/s1600-h/geodjango1.jpeg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3g_tnyVhkrLVZWQjFckBD7VHcmVLLi_ndJRecBG1pxvD55Dip3tNTCiH-IHFRwNhdHMdkaG0VrjpSAuaP6Ltka6TKf2XE_c-jK5RzdojMHWXhNTQQSG6fbc6N7se3iCkJ4zDneYGtbsD6/s400/geodjango1.jpeg&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Luego vamos a &lt;a href=&quot;http://127.0.0.1:9090/admin&quot;&gt;http://127.0.0.1:9090/admin&lt;/a&gt; y veremos esta interfaz:&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; font-family: Arial,Helvetica,sans-serif; text-align: center;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjdRN0NaF2CJAWpZlIvsb0f5LHDLKeLhW6lYahOI3Qx__6X9m7-UqSvjO9E3yhSU8dlkaL4oXYsdwMZ02ngoldIeX5sRD7eehuhW1bjbDJKJ3Qp6up7kJCcJUmhKucnwcwYIaAJW0eFSjSp/s1600-h/geodjango2.jpeg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjdRN0NaF2CJAWpZlIvsb0f5LHDLKeLhW6lYahOI3Qx__6X9m7-UqSvjO9E3yhSU8dlkaL4oXYsdwMZ02ngoldIeX5sRD7eehuhW1bjbDJKJ3Qp6up7kJCcJUmhKucnwcwYIaAJW0eFSjSp/s400/geodjango2.jpeg&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;alli ingresamos el usuario y la clave que configuramos cuando corrimos el comando syncdb y veremos esto:&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; font-family: Arial,Helvetica,sans-serif; text-align: center;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtiSK1rT6eHZ_Hne9d54-srqMOvry5vG9P3aN84jV1IccmOWFBpqgUicyD6OkETEHncX1ChRuYmyqViH1sx6klkb8GQn91i2egkZdSO-i4yteBdh4sKuKRLCjqKkFqx0q82wVecq6JQV6g/s1600-h/geodjango3.jpeg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtiSK1rT6eHZ_Hne9d54-srqMOvry5vG9P3aN84jV1IccmOWFBpqgUicyD6OkETEHncX1ChRuYmyqViH1sx6klkb8GQn91i2egkZdSO-i4yteBdh4sKuKRLCjqKkFqx0q82wVecq6JQV6g/s400/geodjango3.jpeg&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Luego hacemos clic en World Borders y veremos algo así:&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; font-family: Arial,Helvetica,sans-serif; text-align: center;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEii3w59j47SXm1VPtPpj9f3yc5KKByCUcMoru3StihytD1NgbX6faPbhkrnRG4zCPnhzJJjdFkT-YQIf13WDAOS8R3o9pzRscC9UKR9xyHU6Z9vkrxIIi2W6qBTK1gZKWw_OBtlh3JwOSpl/s1600-h/geodjango4.jpeg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEii3w59j47SXm1VPtPpj9f3yc5KKByCUcMoru3StihytD1NgbX6faPbhkrnRG4zCPnhzJJjdFkT-YQIf13WDAOS8R3o9pzRscC9UKR9xyHU6Z9vkrxIIi2W6qBTK1gZKWw_OBtlh3JwOSpl/s400/geodjango4.jpeg&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Allí podemos ordenar la lista por nombre&amp;nbsp; del pais (name), area (area), poblacion del 2005 (population 2005) o longitud y latitud del mismo. Ahora cerca al boton buscar ingresamos colombia y le damos buscar luego clic en colombia y veremos info y este mapa:&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; font-family: Arial,Helvetica,sans-serif; text-align: center;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiu5Yts21pcJuqGN-MbhqJI_nsmz3whZCucnY_ikHFswWgkKUnyaETGJQZwRBO0SNngdDpsPTxJWjqnIwf0E3rZUxnluBHpQ5_dA_Q-FNsB2jqvIbc8lCrjM9y6B6cdUqfe1LTdEBDeOYrj/s1600-h/geodjango5.jpeg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiu5Yts21pcJuqGN-MbhqJI_nsmz3whZCucnY_ikHFswWgkKUnyaETGJQZwRBO0SNngdDpsPTxJWjqnIwf0E3rZUxnluBHpQ5_dA_Q-FNsB2jqvIbc8lCrjM9y6B6cdUqfe1LTdEBDeOYrj/s400/geodjango5.jpeg&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Y eso es todo, así tendremos nuestro &quot;Hola mundo&quot; con geodjango, django, postgres, postgis, etc...&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pyautoservicio.blogspot.com/feeds/7192950568167848003/comments/default' title='Comentarios de la entrada'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3350527338829175333/7192950568167848003?isPopup=true' title='2 Comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3350527338829175333/posts/default/7192950568167848003'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3350527338829175333/posts/default/7192950568167848003'/><link rel='alternate' type='text/html' href='http://pyautoservicio.blogspot.com/2009/08/primeros-pasos-con-geodjango.html' title='Primeros pasos con geodjango'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08392322258019975226</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3g_tnyVhkrLVZWQjFckBD7VHcmVLLi_ndJRecBG1pxvD55Dip3tNTCiH-IHFRwNhdHMdkaG0VrjpSAuaP6Ltka6TKf2XE_c-jK5RzdojMHWXhNTQQSG6fbc6N7se3iCkJ4zDneYGtbsD6/s72-c/geodjango1.jpeg" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3350527338829175333.post-6704388301243592942</id><published>2009-08-30T20:07:00.000-05:00</published><updated>2009-08-30T20:07:10.599-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="debian"/><category scheme="http://www.blogger.com/atom/ns#" term="mapserver"/><category scheme="http://www.blogger.com/atom/ns#" term="web 2.0"/><category scheme="http://www.blogger.com/atom/ns#" term="webdev"/><title type='text'>Hola Mundo con Mapserver</title><content type='html'>&lt;div style=&quot;text-align: justify;&quot;&gt;Este es un post con el &quot;hola mundo&quot;  del mapserver, basado en la información del post &lt;a href=&quot;http://blueswinter.blogspot.com/2009/05/mapserver-ii-mi-primer-experiencia.html&quot;&gt;http://blueswinter.blogspot.com/2009/05/mapserver-ii-mi-primer-experiencia.html&lt;/a&gt; y para debian testing.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Primero debemos instalar apache y mapserver así:&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;$ apt-get install cgi-mapserver mapserver-bin mapserver-doc apache2&lt;/div&gt;&lt;br /&gt;
Luego creamos una carpeta para poner los datos del primer mapa (como root):&lt;br /&gt;
&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;$ mkdir /home/mapdata/&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;$ chmod 777 /home/mapdata/&lt;/div&gt;&lt;br /&gt;
Luego dentro del directorio (cd /home/mapdata) hacemos un archivo&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;$ nano hola.map&lt;/div&gt;&lt;br /&gt;
y le ponemos el siguiente contenido:&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;MAP&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
# Este es nuestro &#39;hola mundo&#39; mapfile&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
NAME &quot;Hello_Word&quot;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
SIZE 400 300&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
IMAGECOLOR 249 245 186&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
IMAGETYPE png&lt;br /&gt;
EXTENT -1.00 -1.00 1.00 1.00&lt;br /&gt;
WEB&lt;br /&gt;
TEMPLATE &quot;&lt;span style=&quot;color: black;&quot;&gt;/var/www/map/&lt;/span&gt;hola.html&quot;&lt;br /&gt;
IMAGEPATH &quot;/var/www/map/tmp/&quot;&lt;br /&gt;
IMAGEURL &quot;/map/tmp/&quot;&lt;br /&gt;
END&lt;br /&gt;
LAYER&lt;br /&gt;
STATUS default&lt;br /&gt;
TYPE point&lt;br /&gt;
FEATURE&lt;br /&gt;
POINTS 0.0 0.0 END&lt;br /&gt;
TEXT &quot;HOLA MUNDO&quot;# USA 2 ESPACIOS!&lt;br /&gt;
END # end FEATURE&lt;br /&gt;
CLASS&lt;br /&gt;
STYLE&lt;br /&gt;
COLOR 255 0 0&lt;br /&gt;
END&lt;br /&gt;
LABEL&lt;br /&gt;
TYPE bitmap&lt;br /&gt;
END&lt;br /&gt;
END # end CLASS&lt;br /&gt;
END # end LAYER&lt;br /&gt;
END # end MAPFILE&lt;br /&gt;
END&lt;/div&gt;&lt;br /&gt;
Guardamos con &lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;ctrl+s&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
luego vamos al directorio de apache (en debian es /var/www/) y creamos una carpeta para la prueba (como root ):&lt;br /&gt;
&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;$ mkdir map&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;$ mkdir map/tmp&lt;/div&gt;&lt;br /&gt;
y dentro de map hacemos un html:&lt;br /&gt;
&lt;br /&gt;
$ nano hola.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt; html &amp;gt;&lt;br /&gt;
&amp;lt; head &amp;gt;&amp;lt; title &amp;gt;MapServer Hola Mundo&amp;lt; /head &amp;gt; &lt;br /&gt;
&amp;lt; body &amp;gt;&lt;br /&gt;
&amp;lt; form method=POST action=&quot;/cgi-bin/mapserver&quot;&amp;gt;&lt;br /&gt;
&amp;lt; input type=&quot;submit&quot; value=&quot;cliqueame&quot; &amp;gt;&lt;br /&gt;
&amp;lt; input type=&quot;hidden&quot; name=&quot;map&quot; value=&quot;/home/mapdata/hola.map&quot; &amp;gt;&lt;br /&gt;
&amp;lt; input type=&quot;hidden&quot; name=&quot;map_web&quot; value=&quot;imagepath /var/www/map/tmp/ imageurl /map/tmp/&quot; &amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt; img src=&quot;[img]&quot; with=400 heigth=300 border=0 &amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
guardamos y en el navegador vamos a &lt;a href=&quot;http://localhost/map/hola.html&quot;&gt;http://localhost/map/hola.html&lt;/a&gt; hacemos clic en el boton y listo!, vemos algo como esto:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2V6wp6SGfCBMBgDrnyfJFUuBRb94Tb8MBSZuXsLyUJauuFG85Cxj8_4vUoX9_9dNE2-Au5ggREoGLBRylUvlvjsYMZA9Vd34_oxtEb7YCo6nFoGAMqfOTVkCXAb7out6cl9jbrn88KCFp/s1600-h/mapserver.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2V6wp6SGfCBMBgDrnyfJFUuBRb94Tb8MBSZuXsLyUJauuFG85Cxj8_4vUoX9_9dNE2-Au5ggREoGLBRylUvlvjsYMZA9Vd34_oxtEb7YCo6nFoGAMqfOTVkCXAb7out6cl9jbrn88KCFp/s400/mapserver.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pyautoservicio.blogspot.com/feeds/6704388301243592942/comments/default' title='Comentarios de la entrada'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3350527338829175333/6704388301243592942?isPopup=true' title='0 Comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3350527338829175333/posts/default/6704388301243592942'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3350527338829175333/posts/default/6704388301243592942'/><link rel='alternate' type='text/html' href='http://pyautoservicio.blogspot.com/2009/08/hola-mundo-con-mapserver.html' title='Hola Mundo con Mapserver'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08392322258019975226</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2V6wp6SGfCBMBgDrnyfJFUuBRb94Tb8MBSZuXsLyUJauuFG85Cxj8_4vUoX9_9dNE2-Au5ggREoGLBRylUvlvjsYMZA9Vd34_oxtEb7YCo6nFoGAMqfOTVkCXAb7out6cl9jbrn88KCFp/s72-c/mapserver.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3350527338829175333.post-3313649364470218779</id><published>2009-03-20T17:34:00.000-05:00</published><updated>2009-03-20T17:34:06.019-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="django"/><category scheme="http://www.blogger.com/atom/ns#" term="python"/><category scheme="http://www.blogger.com/atom/ns#" term="webdev"/><title type='text'>Snippet de vista para i18n</title><content type='html'>Una de las cosas que nos ofrece django es vistas genéricas y soporte para localización (aka i10n) e internacionalización (aka i18n). Entonces una vez tenemos nuestro sitio con i18n o i10n pues lo que sigue es que le demos a nuestros usuarios la manera de escoger su idioma, django tiene un algoritmo par esto, sin embargo en algún punto nuestros usuarios querrán poder escoger su idioma preferido, para esto este framework nos da la opcion de una vista generica, sobre la cual encontrarán información en http://docs.djangoproject.com/en/dev/topics/i18n/#the-set-language-redirect-view.&lt;br /&gt;
&lt;br /&gt;
Lo único es que esta vista espera que halla un formulario para que el usuario escoja su idioma y además que tengamos predefinida una página a la cual el usuario será redirigido después de seleccionar el idioma a lo cual le veo particularmente un inconveniente pues si el usuario ha llegado a un punto importante para él y es llevado a la página inicial pues no le agradará (en mi caso me molestaría), además si queremos tener la posibilidad de hacerlo desde una url y no una variable por post?&lt;br /&gt;
&lt;br /&gt;
Para resolver este conflicto se modifica un poco la vista que nos trae django y la dejamos así:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
def set_lang(request,lang):&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; response = HttpResponseRedirect(request.META[&#39;HTTP_REFERER&#39;])&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; lang_code = u&#39;%s&#39; % lang&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; if lang_code and check_for_language(lang_code):&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if hasattr(request, &#39;session&#39;):&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; request.session[&#39;django_language&#39;] = lang_code&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else:&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; response.set_cookie(settings.LANGUAGE_COOKIE_NAME, lang_code)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; return response&lt;br /&gt;
&lt;br /&gt;
Esta vista espera que se escoja el idioma por una url y además redireccionará al usuario a la página en la que se encontraba, podemos hacerlo incluso en el urls.py y finalmente escogemos la url:&lt;br /&gt;
&lt;br /&gt;
urlpatterns = patterns(&#39;&#39;,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; ...&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; (r&#39;^set_lang/(?P&lt;lang&gt;\w{2})/$&#39;,set_lang),&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; ...&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
de esta manera si se va a /set_lang/es/, django cargará todo nuestro sitio en español y volvera a la vista en la que lo hallamos hecho.&lt;/lang&gt;</content><link rel='replies' type='application/atom+xml' href='http://pyautoservicio.blogspot.com/feeds/3313649364470218779/comments/default' title='Comentarios de la entrada'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3350527338829175333/3313649364470218779?isPopup=true' title='1 Comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3350527338829175333/posts/default/3313649364470218779'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3350527338829175333/posts/default/3313649364470218779'/><link rel='alternate' type='text/html' href='http://pyautoservicio.blogspot.com/2009/03/snippet-de-vista-para-i18n.html' title='Snippet de vista para i18n'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08392322258019975226</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total><georss:featurename>Bogotá, Colombia</georss:featurename><georss:point>4.6473016 -74.0962677</georss:point><georss:box>4.4762051 -74.3297272 4.8183981 -73.8628082</georss:box></entry><entry><id>tag:blogger.com,1999:blog-3350527338829175333.post-3693975652534189423</id><published>2009-03-09T12:33:00.000-05:00</published><updated>2009-03-09T12:33:34.688-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="nota mental"/><category scheme="http://www.blogger.com/atom/ns#" term="webdev"/><title type='text'>Plugins de firefox para desarrollo web</title><content type='html'>Este es el listado de los plugins para desarrollo web creo fundamentales:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://addons.mozilla.org/es-ES/firefox/addon/3829&quot;&gt;Live HTTP Headers &lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://addons.mozilla.org/es-ES/firefox/addon/60&quot;&gt;Web Developer&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://addons.mozilla.org/es-ES/firefox/addon/1843&quot;&gt;Firebug &lt;/a&gt;&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://addons.mozilla.org/es-ES/firefox/addon/216&quot;&gt;JavaScript Debugger&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;Otros que ayudan:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://addons.mozilla.org/es-ES/firefox/addon/7597&quot;&gt;SQL Inject Me&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://addons.mozilla.org/es-ES/firefox/addon/1433&quot;&gt;Extended Statusbar&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content><link rel='replies' type='application/atom+xml' href='http://pyautoservicio.blogspot.com/feeds/3693975652534189423/comments/default' title='Comentarios de la entrada'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3350527338829175333/3693975652534189423?isPopup=true' title='0 Comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3350527338829175333/posts/default/3693975652534189423'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3350527338829175333/posts/default/3693975652534189423'/><link rel='alternate' type='text/html' href='http://pyautoservicio.blogspot.com/2009/03/plugins-de-firefox-para-desarrollo-web.html' title='Plugins de firefox para desarrollo web'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08392322258019975226</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total><georss:featurename>Bogotá, Colombia</georss:featurename><georss:point>4.54612573993931 -74.080077968537807</georss:point><georss:box>1.80921023993931 -77.815429468537815 7.28304123993931 -70.3447264685378</georss:box></entry><entry><id>tag:blogger.com,1999:blog-3350527338829175333.post-9196514539200585212</id><published>2009-02-16T12:53:00.000-05:00</published><updated>2009-02-16T12:53:08.271-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="procrastination"/><title type='text'>Probando otro servicio de identica/twitter</title><content type='html'>&lt;a href=&quot;http://twitterfeed.com/&quot;&gt;http://twitterfeed.com&lt;/a&gt; es un sitio que permite twittear/identiquear un post de un blog, y esta es una prueba</content><link rel='replies' type='application/atom+xml' href='http://pyautoservicio.blogspot.com/feeds/9196514539200585212/comments/default' title='Comentarios de la entrada'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3350527338829175333/9196514539200585212?isPopup=true' title='0 Comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3350527338829175333/posts/default/9196514539200585212'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3350527338829175333/posts/default/9196514539200585212'/><link rel='alternate' type='text/html' href='http://pyautoservicio.blogspot.com/2009/02/probando-otro-servicio-de.html' title='Probando otro servicio de identica/twitter'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08392322258019975226</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3350527338829175333.post-8287628625618848723</id><published>2009-01-27T18:58:00.000-05:00</published><updated>2009-01-27T19:02:00.701-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="self"/><title type='text'>16pf</title><content type='html'>&lt;div align=&quot;center&quot;&gt; &lt;table style=&quot;background: rgb(238, 238, 238) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: rgb(234, 234, 234);&quot; bg=&quot;&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;&gt; &lt;tbody&gt;&lt;tr&gt;&lt;br /&gt;&lt;td&gt; &lt;div align=&quot;center&quot;&gt; &lt;span style=&quot;color: rgb(53, 53, 53);&quot;&gt;Cattell&#39;s 16 Factor&lt;br /&gt;Test Results&lt;/span&gt;&lt;br /&gt;&lt;table style=&quot;background: rgb(221, 221, 221) none repeat scroll 0% 0%; color: black; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;&quot; bgcolor=&quot;#dddddd&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;4&quot;&gt;&lt;br /&gt;&lt;tbody&gt;&lt;tr&gt; &lt;td&gt;Warmth&lt;/td&gt; &lt;td width=&quot;50&quot;&gt;||||||||||||&lt;/td&gt; &lt;td width=&quot;30&quot;&gt;38%&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Intellect&lt;/td&gt; &lt;td width=&quot;50&quot;&gt;|||||||||||||||||||||&lt;/td&gt; &lt;td width=&quot;30&quot;&gt;70%&lt;/td&gt; &lt;/tr&gt;&lt;br /&gt;&lt;tr&gt; &lt;td&gt;Emotional Stability&lt;/td&gt; &lt;td width=&quot;50&quot;&gt;|||||||||&lt;/td&gt; &lt;td width=&quot;30&quot;&gt;22%&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Aggressiveness&lt;/td&gt; &lt;td width=&quot;50&quot;&gt;|||||||||||||||||||||&lt;/td&gt; &lt;td width=&quot;30&quot;&gt;62%&lt;/td&gt; &lt;/tr&gt;&lt;br /&gt;&lt;tr&gt; &lt;td&gt;Liveliness&lt;/td&gt; &lt;td width=&quot;50&quot;&gt;|||||||||||||||||||||&lt;/td&gt; &lt;td width=&quot;30&quot;&gt;62%&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Dutifulness&lt;/td&gt; &lt;td width=&quot;50&quot;&gt;|||||||||||||||&lt;/td&gt; &lt;td width=&quot;30&quot;&gt;46%&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt;&lt;br /&gt;&lt;td&gt;Social Assertiveness&lt;/td&gt; &lt;td width=&quot;50&quot;&gt;|||||||||||||||&lt;/td&gt; &lt;td width=&quot;30&quot;&gt;42%&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Sensitivity&lt;/td&gt; &lt;td width=&quot;50&quot;&gt;||||||||||||||||||||||||||||&lt;/td&gt; &lt;td width=&quot;30&quot;&gt;82%&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Paranoia&lt;/td&gt; &lt;td width=&quot;50&quot;&gt;|||||||||||||||||||||&lt;/td&gt;&lt;br /&gt;&lt;td width=&quot;30&quot;&gt;66%&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Abstractness&lt;/td&gt; &lt;td width=&quot;50&quot;&gt;|||||||||||||||||||||&lt;/td&gt; &lt;td width=&quot;30&quot;&gt;70%&lt;/td&gt; &lt;/tr&gt;&lt;br /&gt;&lt;tr&gt; &lt;td&gt;Introversion&lt;/td&gt; &lt;td width=&quot;50&quot;&gt;||||||||||||||||||&lt;/td&gt; &lt;td width=&quot;30&quot;&gt;54%&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Anxiety&lt;/td&gt; &lt;td width=&quot;50&quot;&gt;||||||||||||||||||&lt;/td&gt; &lt;td width=&quot;30&quot;&gt;58%&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt;&lt;br /&gt;&lt;td&gt;Openmindedness&lt;/td&gt; &lt;td width=&quot;50&quot;&gt;|||||||||||||||||||||&lt;/td&gt; &lt;td width=&quot;30&quot;&gt;70%&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Independence&lt;/td&gt; &lt;td width=&quot;50&quot;&gt;|||||||||||||||||||||&lt;/td&gt; &lt;td width=&quot;30&quot;&gt;70%&lt;/td&gt; &lt;/tr&gt;&lt;br /&gt;&lt;tr&gt; &lt;td&gt;Perfectionism&lt;/td&gt; &lt;td width=&quot;50&quot;&gt;||||||||||||||||||&lt;/td&gt; &lt;td width=&quot;30&quot;&gt;58%&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Tension&lt;/td&gt; &lt;td width=&quot;50&quot;&gt;|||||||||||||||&lt;/td&gt; &lt;td width=&quot;30&quot;&gt;46%&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;/div&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt; &lt;a href=&quot;http://similarminds.com/cattell-16-factor.html&quot;&gt;Take Cattell 16&lt;br /&gt;Factor Test (similar to 16pf)&lt;/a&gt;&lt;br /&gt;&lt;span style=&quot;font-size:78%;&quot;&gt;&lt;a href=&quot;http://similarminds.com/&quot;&gt;personality tests by&lt;br /&gt;similarminds.com&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Lo pongo solo porque me rechazarón (una psicologa claro).</content><link rel='replies' type='application/atom+xml' href='http://pyautoservicio.blogspot.com/feeds/8287628625618848723/comments/default' title='Comentarios de la entrada'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3350527338829175333/8287628625618848723?isPopup=true' title='0 Comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3350527338829175333/posts/default/8287628625618848723'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3350527338829175333/posts/default/8287628625618848723'/><link rel='alternate' type='text/html' href='http://pyautoservicio.blogspot.com/2009/01/16pf.html' title='16pf'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08392322258019975226</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3350527338829175333.post-5735889116183341094</id><published>2009-01-22T13:05:00.006-05:00</published><updated>2009-01-22T14:49:57.900-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="desktop"/><category scheme="http://www.blogger.com/atom/ns#" term="django"/><category scheme="http://www.blogger.com/atom/ns#" term="geek"/><category scheme="http://www.blogger.com/atom/ns#" term="musik"/><category scheme="http://www.blogger.com/atom/ns#" term="python"/><title type='text'>Como usar el poderoso ORM de django en una aplicación de Escritorio</title><content type='html'>&lt;div style=&quot;text-align: justify;&quot;&gt;Alguna vez alguien me preguntaba que tan complejo seria usar el poderoso ORM de &lt;a href=&quot;http://djangoproject.com/&quot; linkindex=&quot;639&quot;&gt;django&lt;/a&gt; en una aplicación de escritorio, lo cual me pareció una cuestión interesante pero debido al trabajo y la procrastinación™ lo dejé a algún lado, en estos días como ando melómano he estado dedicándole mucho tiempo a la musica, por cierto el reproductor que yo uso es &lt;a href=&quot;http://amarok.kde.org/&quot; linkindex=&quot;640&quot;&gt;Amarok&lt;/a&gt;, aunque también decidí probar el &lt;a href=&quot;http://www.musicpd.org/&quot; linkindex=&quot;641&quot;&gt;mpd&lt;/a&gt;, en fin cada cual tiene lo suyo y amarok me parece muy poderoso, probé otros mas como exaile, que intenta ser como amarok pero esta escrito en python con librerías gtk y este muy biche, entonces curioseando y por algunos errores de comportamiento en el amarok, me dio por revisar la estructura de la base de datos, y sinceramente no es lo mejor en modelos E-R, entonces quería ver que tan complejo sería hacer un nuevo reproductor de musica, principalmente que sea un frontend a los más comunes, amarok, banshee, mpd, y demás, incluso con una interfaz web al estilo &lt;a href=&quot;http://ampache.org/&quot; linkindex=&quot;642&quot;&gt;ampache&lt;/a&gt;, pero pues obviamente en python y usando django, entonces empecé a realizar el esquema y de repente se me ocurrio la idea de tambien hacer un cliente de escritorio y volvio esta cuestión a mi.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Lo curioso del asunto es que es mucho más sencillo de lo que creia solo hay que poner tres lineas de código al inicio de nuestra aplicación:&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Nota: es importante que crees el proyecto con el django-admin&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; text-align: justify;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;import os, sys&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;os.environ[&#39;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; font-size: x-small;&quot;&gt;DJANGO_SETTINGS_MODULE&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&#39;]=&#39;proyecto.settings&#39;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;sys.path+=[os.path.split(os.path.split(os.path.abspath(__file__))[0])[0]]&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;
La primera linea importa los modulos os y sys.&lt;br /&gt;
La seguna pone la variable de entorno DJANGO_SETTINGS_MODULE que django buscará para saber las configuraciones del archivo settings.py y la ultima agrega al path de python el path de donde se encuentra la carpeta del projecto.&lt;br /&gt;
&lt;br /&gt;
Y de esta manera ya podemos usar todo lo que nos ofrece django en una aplicación de escritorio, el ORM, los validadores, incluso los forms.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pyautoservicio.blogspot.com/feeds/5735889116183341094/comments/default' title='Comentarios de la entrada'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3350527338829175333/5735889116183341094?isPopup=true' title='3 Comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3350527338829175333/posts/default/5735889116183341094'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3350527338829175333/posts/default/5735889116183341094'/><link rel='alternate' type='text/html' href='http://pyautoservicio.blogspot.com/2009/01/como-usar-el-poderoso-orm-de-django-en.html' title='Como usar el poderoso ORM de django en una aplicación de Escritorio'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08392322258019975226</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3350527338829175333.post-4963872601424177208</id><published>2008-12-05T18:45:00.001-05:00</published><updated>2009-01-20T12:58:33.859-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="django"/><category scheme="http://www.blogger.com/atom/ns#" term="python"/><title type='text'>Cambiar permisos de archivos con python</title><content type='html'>Pues bien la historia comienza así:&lt;br /&gt;
Estoy desarrollando una aplicación con &lt;a href=&quot;http://www.djangoproject.com/&quot; linkindex=&quot;266&quot;&gt;django&lt;/a&gt; para una galeria de arte, la url de la pagina en desarrollo es &lt;a href=&quot;http://laotraferia.nodo-lab.com/&quot; linkindex=&quot;267&quot;&gt;http://laotraferia.nodo-lab.com&lt;/a&gt; que después apuntará a &lt;a href=&quot;http://www.laotraferia.com/&quot; linkindex=&quot;268&quot;&gt;http://www.laotraferia.com&lt;/a&gt; y pues probé con &lt;a href=&quot;http://pyjax.net/blog/1/2007/06/27/django-flash-audioplayer/&quot; linkindex=&quot;269&quot;&gt;django-audioplayer&lt;/a&gt; que es un tag para embeber un reproductor de mp3 en la pagina, y no me funcionaba porque por algun motivo extraño al subir el mp3, me quedaba sin permisos de lectura en el servidor, por lo cual decidí que debia cambiarle los permisos cada vez que suban el archivo por lo cual debia reescribir el metodo save en el modelo:&lt;br /&gt;
&lt;br /&gt;
def save(self,force_insert=False, force_update=False):&lt;br /&gt;
super(Audio,self).save(force_insert,force_update)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Y allí cambiar los permisos cada vez que guarden el objeto, por lo cual busque en la pagina de &lt;a href=&quot;http://www.python.org/&quot; linkindex=&quot;270&quot;&gt;python&lt;/a&gt;, y encontre el metodo chmod en el modulo os, y primero intenté:&lt;br /&gt;
&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; import os&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; os.chmod(&quot;archivo&quot;,&quot;777&quot;)&lt;br /&gt;
&lt;br /&gt;
Al viejo estilo de linux, pero esto me genera un error pues el modo debe ser un entero y no una cadena, hice este cambio y no me genero error pero me cambió los permisos de una forma extraña, luego lei un poco más y es que esto debe hacerse usando otro modulo stat, de la siguiente manera:&lt;br /&gt;
&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; import os&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; import stat&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; os.chmod(&quot;archivo&quot;,&lt;code&gt;stat.S_IRUSR+stat.&lt;/code&gt;&lt;code&gt;S_IWUSR+stat.&lt;/code&gt;&lt;code&gt;S_IRGRP+stat.&lt;/code&gt;&lt;code&gt;S_IXGRP&lt;/code&gt;)&lt;br /&gt;
&lt;br /&gt;
y de esta manera me deja los permisos de lectura y escritura para el usuario y lectura para los demás.&lt;br /&gt;
&lt;br /&gt;
Estas variables del modulo stat son enteros, y equivalena a un 420.&lt;br /&gt;
&lt;br /&gt;
Más adelante debo entender bien el porque de esto.&lt;br /&gt;
&lt;br /&gt;
Actualización:&lt;br /&gt;
Definitivamente el problema siempre es capa 8, primero y más importante, a partir de la versión 1.0.2 django, existe una opcion de configuracion para establecer cuales son los permisos con los cuales nuestro framework favorito debe dejar los archivos que se suban a través del admin y formularios.&lt;br /&gt;
Esta variable es &lt;a href=&quot;http://docs.djangoproject.com/en/dev/ref/settings/#file-upload-permissions&quot; linkindex=&quot;271&quot;&gt;FILE_UPLOAD_PERMISSIONS&lt;/a&gt; y debe contener el valor que desamos tengan los archivos, si queremos no usar lo anterior del modulo stat, lo que debemos es anteponer un 0 al modo octal que conocemos de chmod, es decir en vez de poner un 420 que no nos es familiar podemos poner 0644 sin comillas ni nada, de esta manera python sabe que el 644 es un octal y no un entero. De hecho si entramos al interprete de python y escribimos 0644 este se nos mostrara como un entero (420)</content><link rel='replies' type='application/atom+xml' href='http://pyautoservicio.blogspot.com/feeds/4963872601424177208/comments/default' title='Comentarios de la entrada'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3350527338829175333/4963872601424177208?isPopup=true' title='3 Comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3350527338829175333/posts/default/4963872601424177208'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3350527338829175333/posts/default/4963872601424177208'/><link rel='alternate' type='text/html' href='http://pyautoservicio.blogspot.com/2008/12/cambiar-permisos-de-archivos-con-python.html' title='Cambiar permisos de archivos con python'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08392322258019975226</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total><georss:featurename>Bogotá, Colombia</georss:featurename><georss:point>4.6473016 -74.0962677</georss:point><georss:box>4.4762051 -74.3297272 4.8183981 -73.8628082</georss:box></entry><entry><id>tag:blogger.com,1999:blog-3350527338829175333.post-2125084593880184467</id><published>2008-10-31T09:52:00.001-05:00</published><updated>2008-10-31T09:52:57.782-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ocio"/><title type='text'>diegueus9 vs velociraptor</title><content type='html'>&lt;a href=&quot;http://www.bunkbeds.net/velociraptor/&quot; style=&quot;-moz-background-clip: -moz-initial; -moz-background-inline-policy: -moz-initial; -moz-background-origin: -moz-initial; background: rgb(0, 0, 0) url(http://www.bunkbeds.net/velociraptor/img/badge.jpg) no-repeat scroll 0pt 0pt; color: #ff9900; display: block; font-family: Times New Roman,serif; font-size: 30px; height: 157px; padding-top: 150px; text-align: center; text-decoration: none; width: 322px;&quot;&gt; &lt;span style=&quot;display: none;&quot;&gt;I could survive for&lt;/span&gt; 1 minute, 6 seconds &lt;span style=&quot;display: none;&quot;&gt;chained to a bunk bed with a velociraptor&lt;/span&gt; &lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://pyautoservicio.blogspot.com/feeds/2125084593880184467/comments/default' title='Comentarios de la entrada'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3350527338829175333/2125084593880184467?isPopup=true' title='1 Comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3350527338829175333/posts/default/2125084593880184467'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3350527338829175333/posts/default/2125084593880184467'/><link rel='alternate' type='text/html' href='http://pyautoservicio.blogspot.com/2008/10/diegueus9-vs-velociraptor.html' title='diegueus9 vs velociraptor'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08392322258019975226</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3350527338829175333.post-7526851833037029098</id><published>2008-09-02T21:21:00.000-05:00</published><updated>2008-09-02T21:31:44.572-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="django"/><category scheme="http://www.blogger.com/atom/ns#" term="geek"/><category scheme="http://www.blogger.com/atom/ns#" term="python"/><title type='text'>E-commerce y django</title><content type='html'>&lt;div style=&quot;text-align: justify;&quot;&gt;Pues he estado revisando mi correo, particularmente la etiqueta de django-es, y alguna persona preguntaba por como hacer comercio electrónico con django, y le recomendaron la pagina &lt;a href=&quot;http://www.satchmoproject.com/&quot;&gt;http://www.satchmoproject.com/&lt;/a&gt; esta el código con licencia bsd y algunos ejemplos de paginas donde la usan, e increíblemente (solo para mi) lo usan en la tienda de la Free Software Foundation en &lt;a href=&quot;http://shop.fsf.org/&quot;&gt;http://shop.fsf.org/&lt;/a&gt;, en mi incredulidad debia comprobarlo y lo primero que se me ocurrió fue ir a &lt;a href=&quot;http://shop.fsf.org/admin&quot;&gt;http://shop.fsf.org/admin&lt;/a&gt; y efectivamente&amp;nbsp; allí estaba, la interfaz administrativa de django.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pyautoservicio.blogspot.com/feeds/7526851833037029098/comments/default' title='Comentarios de la entrada'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3350527338829175333/7526851833037029098?isPopup=true' title='0 Comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3350527338829175333/posts/default/7526851833037029098'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3350527338829175333/posts/default/7526851833037029098'/><link rel='alternate' type='text/html' href='http://pyautoservicio.blogspot.com/2008/09/e-commerce-y-django.html' title='E-commerce y django'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08392322258019975226</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3350527338829175333.post-7365952203730339478</id><published>2008-08-26T09:21:00.000-05:00</published><updated>2008-08-26T09:22:29.721-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ocio"/><title type='text'>The Lazy Bloggers Post Generator</title><content type='html'>F*** me dead I just terrible dreadful fear I have not updated this since I fell in love... You would not believe how insane my life has become. Please don&#39;t abandon me!.&lt;br /&gt;
&lt;br /&gt;
I am devastated with finding Jesus (after someone told me he was lost), selling my soul to Google, just generally being an embarrassment to my friends, my day drinking from midday to I run out of alcohol. I am so tired. but who cares.&lt;br /&gt;
&lt;br /&gt;
I will try to remember I promised you I will write something that makes sense soon. Until I need your shoulder to cry on. Just the way life is!.&lt;br /&gt;
&lt;br /&gt;
no me pude resistir:&amp;nbsp; &lt;a href=&quot;http://www.aussiebloggers.com.au/blogpost.html&quot;&gt;http://www.aussiebloggers.com.au/blogpost.html&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://pyautoservicio.blogspot.com/feeds/7365952203730339478/comments/default' title='Comentarios de la entrada'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3350527338829175333/7365952203730339478?isPopup=true' title='0 Comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3350527338829175333/posts/default/7365952203730339478'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3350527338829175333/posts/default/7365952203730339478'/><link rel='alternate' type='text/html' href='http://pyautoservicio.blogspot.com/2008/08/lazy-bloggers-post-generator.html' title='The Lazy Bloggers Post Generator'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08392322258019975226</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3350527338829175333.post-4111516536229080776</id><published>2008-06-27T04:47:00.002-05:00</published><updated>2008-06-27T04:55:24.948-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="critica"/><category scheme="http://www.blogger.com/atom/ns#" term="geek"/><category scheme="http://www.blogger.com/atom/ns#" term="ocio"/><title type='text'>self.__south_park__</title><content type='html'>&lt;a href=&quot;http://devbook.com/charactercreators/southpark/character/1913563/&quot;&gt;&lt;img alt=&quot;Facebook Development&quot; border=&quot;0&quot; src=&quot;http://devbook.com/apps/fun/southparkchar/imagedata/cached/1/19/191/1913/v1-1913563.png&quot; /&gt;&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://pyautoservicio.blogspot.com/feeds/4111516536229080776/comments/default' title='Comentarios de la entrada'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3350527338829175333/4111516536229080776?isPopup=true' title='0 Comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3350527338829175333/posts/default/4111516536229080776'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3350527338829175333/posts/default/4111516536229080776'/><link rel='alternate' type='text/html' href='http://pyautoservicio.blogspot.com/2008/06/facebook-development.html' title='self.__south_park__'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08392322258019975226</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3350527338829175333.post-5479307381527903780</id><published>2008-06-22T12:27:00.003-05:00</published><updated>2008-06-22T12:55:41.666-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="geek"/><category scheme="http://www.blogger.com/atom/ns#" term="google"/><category scheme="http://www.blogger.com/atom/ns#" term="python"/><title type='text'>La Historia de Python</title><content type='html'>Pues he estado revisando el google reader y encontre por ahí un articulo acerca de la historia de Python, en si la historia ya la conocia incluso algunos tips como que fue desarrollado por Guido Van Rossum un dia de navidad, dato que no he podido confirmar. Bueno si quereis mas de la historia, pues como siempre la  &lt;a href=&quot;http://es.wikipedia.org/wiki/Python#Historia&quot;&gt;Wikipedia&lt;/a&gt;, pero lo interesante es que la gente de google tambien ha publicado un video hecho por Michael Ogawa donde nos da una vision grafica del desarrollo de mi amado Python.&lt;br /&gt;&lt;br /&gt;&lt;object height=&quot;302&quot; width=&quot;400&quot;&gt; &lt;param name=&quot;allowfullscreen&quot; value=&quot;true&quot;&gt; &lt;param name=&quot;allowscriptaccess&quot; value=&quot;always&quot;&gt; &lt;param name=&quot;movie&quot; value=&quot;http://www.vimeo.com/moogaloop.swf?clip_id=1093745&amp;amp;server=www.vimeo.com&amp;amp;show_title=1&amp;amp;show_byline=1&amp;amp;show_portrait=1&amp;amp;color=ffffff&amp;amp;fullscreen=1&quot;&gt; &lt;embed src=&quot;http://www.vimeo.com/moogaloop.swf?clip_id=1093745&amp;amp;server=www.vimeo.com&amp;amp;show_title=1&amp;amp;show_byline=1&amp;amp;show_portrait=1&amp;amp;color=ffffff&amp;amp;fullscreen=1&quot; type=&quot;application/x-shockwave-flash&quot; allowfullscreen=&quot;true&quot; allowscriptaccess=&quot;always&quot; height=&quot;302&quot; width=&quot;400&quot;&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;a href=&quot;http://www.vimeo.com/1093745?pg=embed&amp;amp;sec=1093745&quot;&gt;code_swarm - Python&lt;/a&gt; from &lt;a href=&quot;http://www.vimeo.com/michaelogawa?pg=embed&amp;amp;sec=1093745&quot;&gt;Michael Ogawa&lt;/a&gt; on &lt;a href=&quot;http://vimeo.com/?pg=embed&amp;amp;sec=1093745&quot;&gt;Vimeo&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;PDT: el video fue hecho con &lt;a href=&quot;http://processing.org/&quot;&gt;processing&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://pyautoservicio.blogspot.com/feeds/5479307381527903780/comments/default' title='Comentarios de la entrada'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3350527338829175333/5479307381527903780?isPopup=true' title='1 Comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3350527338829175333/posts/default/5479307381527903780'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3350527338829175333/posts/default/5479307381527903780'/><link rel='alternate' type='text/html' href='http://pyautoservicio.blogspot.com/2008/06/la-historia-de-python.html' title='La Historia de Python'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08392322258019975226</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3350527338829175333.post-6709337727352575824</id><published>2008-06-13T09:28:00.004-05:00</published><updated>2008-06-13T09:39:37.485-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="critica"/><category scheme="http://www.blogger.com/atom/ns#" term="locombia"/><category scheme="http://www.blogger.com/atom/ns#" term="ocio"/><category scheme="http://www.blogger.com/atom/ns#" term="python"/><title type='text'>ElTiempo.com y Python</title><content type='html'>&lt;div style=&quot;text-align: justify;&quot;&gt;Pues si señores que no me lo imagine nunca, hoy estaba desperdiciando&lt;br /&gt;mi tiempo en &lt;a href=&quot;http://www.facebook.com/&quot;&gt;www.facebook.com&lt;/a&gt;, y me encontré con la sorpresa que ayer&lt;br /&gt;el &lt;a href=&quot;http://www.elttiempo.com/&quot;&gt;www.eltiempo.com/&lt;/a&gt; libero su versión 1.0 del API para un concurso&lt;br /&gt;en el cual el premio es una entrada al &lt;a href=&quot;http://www.campus-party.org/&quot;&gt;Campus Party de Valencia del 28 de&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://www.campus-party.org/&quot;&gt;julio al 3 de agosto&lt;/a&gt;, pero esto no para ahí, luego me reí bastante&lt;br /&gt;cuando mas abajo decía los nombres de los jueces con el jocoso titulo&lt;br /&gt;de &quot;¿A quiénes tienes que impresionar?&quot; y entre ellos se encuentra&lt;br /&gt;Polkan García, uno de los máximos representantes de la comunidad&lt;br /&gt;&lt;irony&gt;del anillo&lt;/irony&gt;, digo de software libre de Colombia, el cual&lt;br /&gt;es bastante dificil de impresionar, revisando el enlace de dicha API&lt;br /&gt;llegue a code.google.com, y me sorprendió mas, pero luego lei un poco&lt;br /&gt;sobre ella y dan soporte a json y a xml, para terminar mi sorpresa&lt;br /&gt;colocaron dos ejemplos de código en python, lo cual es muy novedoso y&lt;br /&gt;me agrado, pero luego lo revise y que creen, pues si, un WTF:&lt;/div&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;# Listado de noticias, fÃ¡cil de leer en texto plano&lt;br /&gt;print &#39;Estas son las&#39;, feed[&#39;feed&#39;][&#39;title&#39;] + &quot;\n&quot;&lt;br /&gt;for e in feed[&#39;entries&#39;]:&lt;br /&gt;print e.title + &quot;\n&quot;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;El codigo no esta mal pero es lo que un amigo llamaría ofuscado, pues&lt;br /&gt;no se sabe si lo hacen a propósito pero la primera linea de código,&lt;br /&gt;concatena tres cadenas de dos maneras distintas y eso es visualmente&lt;br /&gt;desagradable, me pregunto si el ultimo &quot;\n&quot; también es adrede  pero de&lt;br /&gt;hecho el solo print hace el salto de linea.&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Lo mas WTF del asunto es que la gente de este periódico criollo se da&lt;br /&gt;la maña de hacer un API y no son capaces de revisar los articulos&lt;br /&gt;publicados en el portal, vean&lt;br /&gt;&lt;a href=&quot;http://www.flickr.com/groups/eltiempo/pool/show/&quot;&gt;http://www.flickr.com/groups/eltiempo/pool/show/&lt;/a&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://pyautoservicio.blogspot.com/feeds/6709337727352575824/comments/default' title='Comentarios de la entrada'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3350527338829175333/6709337727352575824?isPopup=true' title='3 Comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3350527338829175333/posts/default/6709337727352575824'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3350527338829175333/posts/default/6709337727352575824'/><link rel='alternate' type='text/html' href='http://pyautoservicio.blogspot.com/2008/06/eltiempocom-y-python.html' title='ElTiempo.com y Python'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08392322258019975226</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3350527338829175333.post-6000778041228663563</id><published>2008-06-12T12:11:00.002-05:00</published><updated>2008-06-12T12:15:26.109-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="python"/><category scheme="http://www.blogger.com/atom/ns#" term="pythoncolombia"/><title type='text'>Lista de Python Colombia</title><content type='html'>Dado el auge que tiene &lt;a href=&quot;http://www.djangoproject.com/&quot;&gt;Django&lt;/a&gt;, he decidido invitar a&lt;br /&gt;varias personas a unirse a la lista de Python Colombia, es importante&lt;br /&gt;ponerme las pilas para activar esta comunidad, espero que los otros&lt;br /&gt;miembros fundadores como ceronman, dirakx, randrespoc, y jorge (se me&lt;br /&gt;acaba de olvidar el nick de jorge) nos pongamos las pilas con esto.&lt;p&gt;Ya he hecho la suficiente evangelización de &lt;a href=&quot;http://www.python.org/&quot;&gt;Python&lt;/a&gt;, ahora me&lt;br /&gt;puedo poner a trabajar en algunos proyectos personales y ver si poco a&lt;br /&gt;poco se adhiere mas gente a esta comunidad, una cosa que hice fue&lt;br /&gt;escribirla en &lt;a href=&quot;http://www.nabble.com/&quot;&gt;www.nabble.com&lt;/a&gt;, que es un sitio que la indexa y la pone&lt;br /&gt;al servicio de los buscadores para que el día que hay escribamos algo&lt;br /&gt;util le pueda servir a cualquier hispano-hablante. Ademas la embebí al&lt;br /&gt;final de este blog, mientras hago algunos ajustes y la pongo, no se al&lt;br /&gt;ladito o uso el feed de nabble para esto, en fin.&lt;/p&gt;&lt;p&gt;Espero realmente que esa lista se empiece a mover mas y poder comprar&lt;br /&gt;el dominio del sitio, lo que me recuerda que mis supuestos amigos&lt;br /&gt;nunca hicieron el logo por lo que le voy a pedir el favor a tata.&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://pyautoservicio.blogspot.com/feeds/6000778041228663563/comments/default' title='Comentarios de la entrada'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3350527338829175333/6000778041228663563?isPopup=true' title='0 Comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3350527338829175333/posts/default/6000778041228663563'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3350527338829175333/posts/default/6000778041228663563'/><link rel='alternate' type='text/html' href='http://pyautoservicio.blogspot.com/2008/06/lista-de-python-colombia.html' title='Lista de Python Colombia'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08392322258019975226</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3350527338829175333.post-6679656535609666769</id><published>2008-05-15T13:24:00.000-05:00</published><updated>2008-05-15T14:48:50.926-05:00</updated><title type='text'>blogsticker</title><content type='html'>&lt;span id=&quot;owner_htmldata&quot;&gt;dc4d8e64ea339024aa708088edd67c36&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://pyautoservicio.blogspot.com/feeds/6679656535609666769/comments/default' title='Comentarios de la entrada'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3350527338829175333/6679656535609666769?isPopup=true' title='2 Comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3350527338829175333/posts/default/6679656535609666769'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3350527338829175333/posts/default/6679656535609666769'/><link rel='alternate' type='text/html' href='http://pyautoservicio.blogspot.com/2008/05/blogsticker.html' title='blogsticker'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08392322258019975226</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3350527338829175333.post-5742207124305426638</id><published>2008-05-09T10:31:00.002-05:00</published><updated>2008-05-09T10:37:14.035-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="critica"/><category scheme="http://www.blogger.com/atom/ns#" term="geek"/><category scheme="http://www.blogger.com/atom/ns#" term="inteligencia artificial"/><category scheme="http://www.blogger.com/atom/ns#" term="ocio"/><title type='text'>SPAM</title><content type='html'>El día de hoy he leido bastante el Google Reader, y me he encontrado con bastantes noticias acerca del SPAM, que atacan google ad words por alli, que una honey pot para spammers por allá, y asi sustantivamente, pero por el momento ningún  servicio es realmente eficiente pues se bloquean direcciones de correo y/o ips, pero algunas personas somos victimas de los spammers, me dio por revisar la lista de spam de mi cuenta en gmail (que no se note que le vendi mi alma al gran Hermano Google ) y encontre varios mensajes importantes que No eran SPAM, pero lo peor de todo es que mis correos son clasificados como SPAM, es decir mi cuenta de email debe estar en una blacklist o algo asi, pues me estan suplantando...&lt;br /&gt;&lt;br /&gt;El punto es que creo que deberia existir algun heuristica semiinteligente para bloquear correos y no direcciones, me explico mejor, intentar detectar cuales correos son escritos por un ser humano comun y corriente como yo y no por un bot...&lt;br /&gt;&lt;br /&gt;Ya pensaré en algo, por el momento seguiré enviando mensajes de SPAM con la mente :P&lt;br /&gt;&lt;br /&gt;pdta: Será que por escribir tantas veces SPAM me estoy volviendo SPAM???</content><link rel='replies' type='application/atom+xml' href='http://pyautoservicio.blogspot.com/feeds/5742207124305426638/comments/default' title='Comentarios de la entrada'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3350527338829175333/5742207124305426638?isPopup=true' title='0 Comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3350527338829175333/posts/default/5742207124305426638'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3350527338829175333/posts/default/5742207124305426638'/><link rel='alternate' type='text/html' href='http://pyautoservicio.blogspot.com/2008/05/spam.html' title='SPAM'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08392322258019975226</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3350527338829175333.post-3966997795229912882</id><published>2008-05-06T08:55:00.002-05:00</published><updated>2008-05-06T08:57:55.898-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="django"/><category scheme="http://www.blogger.com/atom/ns#" term="geek"/><category scheme="http://www.blogger.com/atom/ns#" term="google"/><category scheme="http://www.blogger.com/atom/ns#" term="python"/><category scheme="http://www.blogger.com/atom/ns#" term="web 2.0"/><title type='text'>Extra</title><content type='html'>Después del fin de semana laaargo, en el cual me desconecte de la red y solo interactue en el &quot;mundo real&quot;, llegué hoy a mi universidad y me di cuenta que la gente de google me envio un correo, solo para decirme que ya me habilitaron la cuenta de Google App Engine, ahora a hechar codigo!!!</content><link rel='replies' type='application/atom+xml' href='http://pyautoservicio.blogspot.com/feeds/3966997795229912882/comments/default' title='Comentarios de la entrada'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3350527338829175333/3966997795229912882?isPopup=true' title='1 Comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3350527338829175333/posts/default/3966997795229912882'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3350527338829175333/posts/default/3966997795229912882'/><link rel='alternate' type='text/html' href='http://pyautoservicio.blogspot.com/2008/05/extra.html' title='Extra'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08392322258019975226</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3350527338829175333.post-4820890708615811556</id><published>2008-04-29T20:04:00.001-05:00</published><updated>2008-04-29T20:06:35.689-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="geek"/><title type='text'>Hans Reiser, declarado culpable de asesinato en primer grado</title><content type='html'>&lt;div class=&quot;article&quot;&gt;&lt;div class=&quot;generaltitle&quot;&gt;&lt;div class=&quot;title&quot;&gt;Sacado de barrapunto&lt;br /&gt;&lt;br /&gt; &lt;/div&gt; &lt;/div&gt;&quot;&lt;a href=&quot;http://es.wikipedia.org/wiki/Hans_Reiser&quot;&gt;Hans Reiser&lt;/a&gt;, desarrollador principal de los sistemas de ficheros &lt;a href=&quot;http://es.wikipedia.org/wiki/ReiserFS&quot;&gt;ReiserFS&lt;/a&gt; y su sucesor &lt;a href=&quot;http://es.wikipedia.org/wiki/Reiser4&quot;&gt;Reiser4&lt;/a&gt;, ha sido finalmente &lt;a href=&quot;http://blog.wired.com/27bstroke6/2008/04/reiser-guilty-o.html&quot;&gt;declarado culpable de asesinato en primer grado&lt;/a&gt; de su mujer Nina. &lt;a href=&quot;http://diegocg.blogspot.com/2007/06/la-novela-de-hans-reiser.html&quot;&gt;Todo lo que rodea el caso ha sido bastante extraño desde el principio&lt;/a&gt;, y podría servir de guión para hacer una película. Reiser conoció a Nina, una ginecóloga rusa, a través de un servicio de citas por Internet. Raiser tiene un carácter difícil y el matrimonio entró pronto en crisis. Nina engañó a su marido con Sean Sturgeon, el mejor amigo de Reiser. Hubo un proceso de divorcio muy desagradable y Nina consiguió una orden de alejamiento y la custodia de los dos hijos que en ese momento tenía el matrimonio. &lt;a href=&quot;http://www.libertaddigital.com/index.php?action=desanoti&amp;amp;cpn=1276317643&quot;&gt;En septiembre de 2006, después de dejar a los niños en casa de Reiser para el fin de semana, Nina desapareció&lt;/a&gt;. La policía encontró pruebas que incriminaban a Reiser: apareció sangre de Nina en su coche, al que le faltaba el asiento del copiloto. Para complicar las cosas, Sturgeon, el amigo de Reiser y amante de Nina, ha confesado ser un asesino en serie que ha matado al menos a ocho personas, pero afirma que no tiene nada que ver con la desaparición de Nina. Hans Reiser afirma que todo es un complot, planeado desde el principio por Nina para quedarse con su dinero, y que Nina está ahora en Rusia, donde sus hijos viven con la abuela materna. &lt;div class=&quot;body&quot;&gt;           &lt;/div&gt;&quot;&lt;br /&gt;&lt;br /&gt;Comentario: Ahora si vale la pena usar reiserfs4 como sistema de archivos, pero aun no tiene buen soporte en debian... Le llevarán portatil a la carcel???&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pyautoservicio.blogspot.com/feeds/4820890708615811556/comments/default' title='Comentarios de la entrada'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3350527338829175333/4820890708615811556?isPopup=true' title='1 Comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3350527338829175333/posts/default/4820890708615811556'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3350527338829175333/posts/default/4820890708615811556'/><link rel='alternate' type='text/html' href='http://pyautoservicio.blogspot.com/2008/04/hans-reiser-declarado-culpable-de.html' title='Hans Reiser, declarado culpable de asesinato en primer grado'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08392322258019975226</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3350527338829175333.post-3127914812233978356</id><published>2008-04-29T11:52:00.002-05:00</published><updated>2008-04-29T16:02:06.303-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="django"/><category scheme="http://www.blogger.com/atom/ns#" term="python"/><category scheme="http://www.blogger.com/atom/ns#" term="web 2.0"/><title type='text'>Habemus Python!!!</title><content type='html'>Hace poco fue el dia D para python y django puesto que el gran hermano Google lanzó el beta de Google App Engine, un sdk de desarrollo de aplicaciones web powered by python, pues bien el ingeniero Camilo Nova, CEO de &lt;a href=&quot;http://axiacore.com&quot;&gt;Axiacore&lt;/a&gt;, me pidió que lo &lt;a href=&quot;http://axiacore.com/blog/2008/04/django-primeros-comentarios/&quot;&gt;asesorará&lt;/a&gt; sobre django, y lo hicé, en cuestion de 1 hora, le mostré el potencial de django y quedó sorprendido, por lo cual dijo que lo iba a pensar y hoy me dio la noticia de que AxiaStore se desarrollará en python, por lo cual puedo decir: Habemus Python!!!</content><link rel='replies' type='application/atom+xml' href='http://pyautoservicio.blogspot.com/feeds/3127914812233978356/comments/default' title='Comentarios de la entrada'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3350527338829175333/3127914812233978356?isPopup=true' title='1 Comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3350527338829175333/posts/default/3127914812233978356'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3350527338829175333/posts/default/3127914812233978356'/><link rel='alternate' type='text/html' href='http://pyautoservicio.blogspot.com/2008/04/habemus-python.html' title='Habemus Python!!!'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08392322258019975226</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3350527338829175333.post-5162984351770673158</id><published>2008-04-25T09:45:00.002-05:00</published><updated>2008-04-25T09:52:56.942-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="geek"/><category scheme="http://www.blogger.com/atom/ns#" term="inteligencia artificial"/><category scheme="http://www.blogger.com/atom/ns#" term="python"/><category scheme="http://www.blogger.com/atom/ns#" term="zope"/><title type='text'>ZPYSE y SPADE</title><content type='html'>En el grupo de inteligencia artificial de la universidad hemos estado&lt;br /&gt;buscando frameworks para el desarrollo de un MAS (Multi-agent system),&lt;br /&gt;obviamente queria hacerlo en mi lenguaje favorito y no en java, que es&lt;br /&gt;el lenguaje que mas manejan en la universidad, lo incomodo es que lo&lt;br /&gt;hacen como una religion mas que porque tenga ventajas como lenguaje de&lt;br /&gt;&quot;alto&quot; nivel, pero eso no viene al caso.&lt;p&gt;El motivo de este post es que buscando por la internet, encontre un&lt;br /&gt;par de enlaces interesantes acerca de este tema y por supuesto&lt;br /&gt;desarrollado en el todopoderoso python, el primero es:&lt;br /&gt;&lt;a href=&quot;http://spade.gti-ia.dsic.upv.es/&quot;&gt;http://spade.gti-ia.dsic.upv.es/&lt;/a&gt; SPADE (Smart Python multi-Agent&lt;br /&gt;Development Environment), un entorno de desarrollo para sistemas&lt;br /&gt;multiagente, ligero que usa Pyro (&lt;a href=&quot;http://pyro.sourceforge.net/&quot;&gt;http://pyro.sourceforge.net/&lt;/a&gt;) y la&lt;br /&gt;implementacion en python de jabber (&lt;a href=&quot;http://www.xmpp.org/&quot;&gt;http://www.xmpp.org/&lt;/a&gt;), es&lt;br /&gt;desarrollado en la Universidad Polit�cnica de Valencia y tiene unas&lt;br /&gt;cositas muy interesantes.&lt;/p&gt;&lt;p&gt;El segundo es aparentemente mejor y es: ZPYSE&lt;br /&gt;(&lt;a href=&quot;http://www.zope.org/Members/drapmeyer/spyse/index_html&quot;&gt;http://www.zope.org/Members/drapmeyer/spyse/index_html&lt;/a&gt;) que es un&lt;br /&gt;modulo de ZOPE (&lt;a href=&quot;http://www.zope.org/&quot;&gt;www.zope.org&lt;/a&gt;) y se basa en spyse (The Smart Python&lt;br /&gt;Simulation Environment) y tiene una arquitectura bastante interesante,&lt;br /&gt;pues es un completo ambiente desde la parte de la transmicion con xml,&lt;br /&gt;hasta la confianza generada por las ontologias web, este se adapta muy&lt;br /&gt;bien a lo que queremos hacer en el grupo, que mas adelante les contare&lt;br /&gt;eso.&lt;/p&gt;&lt;p&gt;Por el momento evaluarlos y escojer... subo una imagen del paper...&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtkjXA9tS-ceVBMgt7O4IatygJe599IbhI3X6SPeZw108bULcmmTk7HqXX6WY13uFJdOGy0F92W4rURLyc_TLdodP2d-ksnDMb6K_euLhT-al_Ob_Dfihh7vopNfcPXg-I2nV8eTt5V6wO/s1600-h/zpyse.jpg&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtkjXA9tS-ceVBMgt7O4IatygJe599IbhI3X6SPeZw108bULcmmTk7HqXX6WY13uFJdOGy0F92W4rURLyc_TLdodP2d-ksnDMb6K_euLhT-al_Ob_Dfihh7vopNfcPXg-I2nV8eTt5V6wO/s320/zpyse.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5193195926533740690&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://pyautoservicio.blogspot.com/feeds/5162984351770673158/comments/default' title='Comentarios de la entrada'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3350527338829175333/5162984351770673158?isPopup=true' title='0 Comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3350527338829175333/posts/default/5162984351770673158'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3350527338829175333/posts/default/5162984351770673158'/><link rel='alternate' type='text/html' href='http://pyautoservicio.blogspot.com/2008/04/zpyse-y-spade.html' title='ZPYSE y SPADE'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08392322258019975226</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtkjXA9tS-ceVBMgt7O4IatygJe599IbhI3X6SPeZw108bULcmmTk7HqXX6WY13uFJdOGy0F92W4rURLyc_TLdodP2d-ksnDMb6K_euLhT-al_Ob_Dfihh7vopNfcPXg-I2nV8eTt5V6wO/s72-c/zpyse.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3350527338829175333.post-3714186489265961894</id><published>2008-04-23T11:05:00.001-05:00</published><updated>2008-04-25T09:48:50.233-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="django"/><category scheme="http://www.blogger.com/atom/ns#" term="geek"/><category scheme="http://www.blogger.com/atom/ns#" term="python"/><title type='text'>Django sites</title><content type='html'>He estado revisando sitios &amp;quot;powered by django&amp;quot; en&lt;br&gt;&lt;a href=&quot;http://www.djangosites.org&quot;&gt;http://www.djangosites.org&lt;/a&gt; y he encontrado &lt;a href=&quot;http://dpaste.com/&quot;&gt;http://dpaste.com/&lt;/a&gt; que esta&lt;br&gt;como el mas alto por votos.&lt;p&gt;pdt: este post fue escrito probando la funcionalidad de blogger de mail2blog</content><link rel='replies' type='application/atom+xml' href='http://pyautoservicio.blogspot.com/feeds/3714186489265961894/comments/default' title='Comentarios de la entrada'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3350527338829175333/3714186489265961894?isPopup=true' title='0 Comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3350527338829175333/posts/default/3714186489265961894'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3350527338829175333/posts/default/3714186489265961894'/><link rel='alternate' type='text/html' href='http://pyautoservicio.blogspot.com/2008/04/django-sites.html' title='Django sites'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08392322258019975226</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3350527338829175333.post-3758932112154431405</id><published>2008-04-23T08:04:00.005-05:00</published><updated>2008-04-23T09:05:49.695-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="django"/><category scheme="http://www.blogger.com/atom/ns#" term="geek"/><category scheme="http://www.blogger.com/atom/ns#" term="google"/><category scheme="http://www.blogger.com/atom/ns#" term="python"/><category scheme="http://www.blogger.com/atom/ns#" term="web 2.0"/><title type='text'>quicknote</title><content type='html'>Hace poco me consegui un trabajo donde debo hacerle varios cambios a una aplicacion desarrollada en &lt;a href=&quot;http://www.python.org&quot;&gt;python&lt;/a&gt; con &lt;a href=&quot;http://www.gtk.org&quot;&gt;gtk&lt;/a&gt; como librera gráfica llamada &lt;a href=&quot;http://www.axique.de/?f=Quicknote&quot;&gt;quicknote&lt;/a&gt;, lo interesante  del asunto es que corre en un celular &lt;a href=&quot;http://www.nokia.es/A4630462&quot;&gt;nokia 810&lt;/a&gt; que esta muy coqueto, ojala me pudiera comprar uno de estos, tienen un linux propio que es derivado de debian, por lo que tiene repositorios apt y todo eso, algunos paquetes como python ya estan portados a este dispositivo, y dentro de poco daran soporte para qt.&lt;br /&gt;&lt;br /&gt;Es muy vacano ver como las empresas de dispositivos moviles como nokia, le apuestan a linux y sobretodo a python, otra cosa interesante que alcancé a ver que tiene soporte para pygame, por lo que se pueden desarrollar juegos para este movil.&lt;br /&gt;&lt;br /&gt;Y tiene ssh!!! el mejor amigo del hombre geek!!! (frase de Santiago Ruano)</content><link rel='replies' type='application/atom+xml' href='http://pyautoservicio.blogspot.com/feeds/3758932112154431405/comments/default' title='Comentarios de la entrada'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3350527338829175333/3758932112154431405?isPopup=true' title='0 Comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3350527338829175333/posts/default/3758932112154431405'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3350527338829175333/posts/default/3758932112154431405'/><link rel='alternate' type='text/html' href='http://pyautoservicio.blogspot.com/2008/04/quicknote.html' title='quicknote'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08392322258019975226</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3350527338829175333.post-9148765205299389003</id><published>2008-04-21T19:17:00.002-05:00</published><updated>2008-04-21T19:24:52.162-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="geek"/><category scheme="http://www.blogger.com/atom/ns#" term="web 2.0"/><title type='text'>Mashup Facebook</title><content type='html'>Tengo muy descuidado este blog, por lo que voy a intentar retomarlo poco a poco, sobretodo para documentar en lo que he estado trabajando en python, algo de inteligencia artificial, redes neuronales, logica difusa, agentes inteligentes, etc.&lt;br /&gt;&lt;br /&gt;Pero por el momento una geekada:&lt;br /&gt;Un mashup para el google reader para las cosas de facebook usando http://pipes.yahoo.com, el pipe es http://pipes.yahoo.com/diegueus9/facebook donde deben escribir su token y su id.</content><link rel='replies' type='application/atom+xml' href='http://pyautoservicio.blogspot.com/feeds/9148765205299389003/comments/default' title='Comentarios de la entrada'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3350527338829175333/9148765205299389003?isPopup=true' title='0 Comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3350527338829175333/posts/default/9148765205299389003'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3350527338829175333/posts/default/9148765205299389003'/><link rel='alternate' type='text/html' href='http://pyautoservicio.blogspot.com/2008/04/mashup-facebook.html' title='Mashup Facebook'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08392322258019975226</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>