[pyar] [django] 2 x 1 consultas de django

Daniel Moisset dmoisset en machinalis.com
Mie Nov 10 09:46:36 ART 2010


2010/11/9 Andrés Gattinoni <andresgattinoni en gmail.com>:
>> en particular, si es relativo a MEDIA_ULR deberias tener
>> src="{{MEDIA_URL}}{{ t.relative_url }}" , donde pasas MEDIA_URL en el
>> contexto
>
> Estoy siguiendo esta documentación:
> http://thumbnail.sorl.net/docs/#djangothumbnail-class
>
> El plugin/aplicación lo que hace es generar thumbnails. Cuando yo lo
> llamo desde el template verifica si el thumbnail existe y si no lo
> crea. Luego me devuelve el path donde se creó el thumbnail.
>
> Actualmente {{ t.relative_url }} me imprime algo así:
> /home/elbarto/programacion/python/dataweb/pydataweb/static/testimonials/tio3_jpg_102x102_q85.jpg
>
> Lo que yo quiero que me imprima es el path relativo, es decir:
> testimonials/tio3_jpg_102x102_q85.jpg

Ahora veo. Y sí, tenéś razón, pero no tengo idea como se resuelve :)

D.



More information about the pyar mailing list