This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import autocomplete_light | |
| autocomplete_light.autodiscover() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| url(r'autocomplete/', include('autocomplete_light.urls')), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| pip install django-autocomplete-light |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| img { | |
| -webkit-transition: -webkit-filter 1s; | |
| -webkit-filter: grayscale(1); /* Chrome */ | |
| filter: url(filters.svg#grayscale); /* Firefox 3.5+ */ | |
| filter: gray; /* IE6-9 */ | |
| } | |
| img:hover { | |
| -webkit-filter: grayscale(0); /* Chrome */ | |
| filter: none; /* Applies to FF + IE */ | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- Obtener las llaves como arreglo | |
| SELECT nombre, akeys(atributos) FROM producto; | |
| -- Saber si un producto tiene cierta característica | |
| SELECT nombre, atributos -> talla FROM producto WHERE atributos ? 'talla'; | |
| -- Obtener el conjunto de características y sus valores para un producto | |
| SELECT each(atributos) FROM producto WHERE name='pizza'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| INSERT INTO producto (nombre, atributos) VALUES ( | |
| 'Bicicleta', | |
| 'color => "verde", | |
| ruedas => 2, | |
| tipo => "monareta"' | |
| ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| CREATE TABLE producto ( | |
| id serial PRIMARY KEY, | |
| nombre varchar, | |
| atributos hstore | |
| ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| CREATE EXTENSION hstore; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #Given to the public domain | |
| #No warranties | |
| import urllib2 | |
| import simplejson | |
| def shorturl(urltoshorten): | |
| """Compress the URL using goo.gl take a look at https://developers.google.com/url-shortener/v1/getting_started | |
| >>> shorturl('http://igor.tamarapatino.org') | |
| 'http://goo.gl/FxHOn' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {% extends "layout/base.html" %} | |
| <div class="entry"> | |
| {% block body %} | |
| <div class="register_init"> | |
| <div class="add_new"> | |
| <a href="/recolecta/nuevo">Nueva Solicitud de Inscripción en el Registro</a> | |
| </div> | |
| <form method="get" action="."> | |
| {{ form.as_p }} | |
| <input type="submit" value="Buscar"> |