Chris Hoeppner <[EMAIL PROTECTED]> writes:
> If I get this right, you're saving the original file, and a separate
> thumb file. While this seems interesting, it's not what I want to
> implement. It's more of a bit of catching the incoming data and
> transforming it before it gets saved in the mod
Nic James Ferrier escribió:
> Chris Hoeppner <[EMAIL PROTECTED]> writes:
>
>> Maybe something like
>>
>> def save(self):
>> self.imageField = pil.thumbnail(self.imageField)
>>
>> Can't really tell if I'm on the right track here.
>
> Search the list... I've got this from the list:
>
>
> I
Chris Hoeppner <[EMAIL PROTECTED]> writes:
> Maybe something like
>
> def save(self):
> self.imageField = pil.thumbnail(self.imageField)
>
> Can't really tell if I'm on the right track here.
Search the list... I've got this from the list:
IMAGE_SIZE = [300, 300]
THUMBNAIL_SIZE = [100
On Jul 23, 11:07 am, Chris Hoeppner <[EMAIL PROTECTED]> wrote:
> Hi there!
>
> I haven't been able to find this documented anywhere (and I'll kindly
> apologize if there actually *is* some doc about it), and thought I'd
> turn to you guys ;)
>
> I'd like to override a model's save() method in orde
There are short docs here:
http://www.djangoproject.com/documentation/model-api/#overriding-default-model-methods
That's really all you need to know. Just manipulate your fields and then
call the original save method (through super).
Another simple example. This save method emulates the behavior
Hi there!
I haven't been able to find this documented anywhere (and I'll kindly
apologize if there actually *is* some doc about it), and thought I'd
turn to you guys ;)
I'd like to override a model's save() method in order to "thumbnailize"
the data from an image field. Users are able to upload i
6 matches
Mail list logo