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
#models.py de ejemplo resumido para el blog | |
class Noticia(models.Model): | |
'''Modelo simple de noticia''' | |
titulo = models.CharField(max_length=100) | |
cuerpo = models.TextField() | |
fecha = models.DatetimeField() | |
imagen = models.ImageField(upload_to="heaven") |
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
#models.py de ejemplo resumido para el blog | |
class Noticia(models.Model): | |
'''Modelo simple de noticia''' | |
titulo = models.CharField(max_length=100) | |
cuerpo = models.TextField() |
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
*.log | |
*.pot | |
*.mo | |
*.pyc | |
*.swp | |
*.swo | |
files/uploads/ | |
local_settings.py |
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
#acortado por conveniencia | |
MEDIA_ROOT = os.path.join(PROJECT_DIR, 'files/media') | |
STATIC_ROOT = os.path.join(PROJECT_DIR, 'files/static') | |
TEMPLATE_DIRS = ( | |
os.path.join(PROJECT_DIR, 'templates'), | |
) |
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 os | |
PROJECT_DIR = os.path.dirname(__file__) | |
DEBUG = True | |
TEMPLATE_DEBUG = DEBUG | |
ADMINS = ( | |
# ('Your Name', '[email protected]'), | |
) |
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
Cualquiera abre con VLC http://www.videolan.org/vlc/ | |
Radio la Primerísima 680am 91.7 fm | |
http://www.rlp.com.ni/static/envivo/envivo.ram (real player) | |
http://www.rlp.com.ni/static/envivo/envivo.m3u (winamp) | |
http://www.rlp.com.ni/static/envivo/envivo.asx (windows media) | |
La Nueva Radio Ya. | |
http://nuevaya.com.ni/ya.m3u | |
http://nuevaya.com.ni/ya.pls |
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
cantidad_actores = Familia.objects.filter(municipio__departamento__id = id).count() + \ | |
Cooperativa.objects.filter(municipio__departamento__id = id).count() + \ | |
Centrales.objects.filter(municipio__departamento__id = id).count()+ \ | |
AsistenciaTecnica.objects.filter(municipio__departamento__id = id).count() |
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
Day job: Python developer at a start up in Chile. | |
Favorite Python project: Django or Sugar. | |
Favorite Conference: PyCon | |
Python Experience Level: Medium (4 years) |
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
#!/bin/bash | |
export TIGGER_HOME=$HOME/.tigger/bin | |
echo "bajando y descomprimiendo tigger" | |
curl http://www.tiggerlovesdevs.com/tigger.tar.bz2 | tar -jxv | |
cd tigger | |
echo "reparando makefile" | |
sed "s@/usr/bin@$TIGGER_HOME@g" makefile > makefile.temp | |
cat makefile.temp > makefile | |
rm makefile.temp | |
echo "creando carpeta destino" |
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
{% load magicembed %} | |
{{ video|magicembed:"640x480" }} => esto carga un video con la dimensiones 640x480 | |
<img src="{{ video|magicthumbnail }}" /> Esto carga el thumbnail del video. |