Código Python:
Ver original#models.py
from django.db import models
from thumbs import ImageWithThumbsField
class Person(models.Model):
photo = ImageWithThumbsField(upload_to='images', sizes=((125,125),(200,200)))
Código Python:
Ver original#views.py
from django.shortcuts import render_to_response
from models import Person
def vista(request):
p = Person.objects.all()[0]
return render_to_response('template.html', {'person': p})
Código django-template:
Ver original<!DOCTYPE html>
<html lang="en">
<!-- template.html -->
<head>
<title></title>
</head>
<body>
<div id="content">
<img src="{{ person.photo.url }}" alt="" />
<img src="{{ person.photo.url_200x200 }}" alt="" />
<img src="{{ person.photo.url_125x125 }}" alt="" />
</div>
</body>
</html>
En el settings.py tengo
Código Python:
Ver originalMEDIA_ROOT = '/ruta/a/media'
MEDIA_URL = 'http://url/a/media/'
STATIC_URL = '/media/'
A mi me funciona perfecto.