I've actually realised I've been an idiot: seen as models are
subclasses of models.Model, I should be able to just call
model.Model.save() from within the custom save method! And my other
idea wouldn't work if the image were changed.

On Jul 12, 12:37 pm, TheBoff <[EMAIL PROTECTED]> wrote:
> Wow: thanks for all the replies guys!
>
> Photologue is perhaps a bit heavyweight for my current purposes,
> although it looks like an extremely impressive bit of kit, and were I
> to make a dedicated photo gallery etc app with django, I would
> certainly use it.
>
> Embedding something in the save method seems like a very good idea: I
> can't work out how to do it without breaking the current save
> functionality in the model, so I think I'll probably do it as a new
> classes style property: no setter, because it's automatic, but the
> getter will try and load the image from a file, and if that fails
> create the file using PIL functionality.
>
> Colin
>
> On Jul 11, 8:39 pm, blis102 <[EMAIL PROTECTED]> wrote:
>
> > You could also use django-photologue. Its quite powerful and very
> > useful in templates:
>
> >http://code.google.com/p/django-photologue/
>
> > Cheers,
> > Dana
>
> > On Jul 11, 12:47 am, "Ben Ford" <[EMAIL PROTECTED]> wrote:
>
> > > Or you could have a look at google appengine for your image storage. They
> > > have an picassa like API that would allow you to do lots of stuff to your
> > > images on the fly and you wouldn't pay for any of the processor cost (or
> > > storage if you're under 500M). Just a thought.
> > > Ben
>
> > > 2008/7/11 Eric Abrahamsen <[EMAIL PROTECTED]>:
>
> > > > It's intensive, but not prohibitively so. I've used a few setups where
> > > > large image files were uploaded and, depending on the options, two or
> > > > even three different versions of the image are created in the save()
> > > > method. The server has yet to explode. Try poking through some of
> > > > these snippets and see if anything appeals to you:
>
> > > >http://www.djangosnippets.org/tags/thumbnail/
>
> > > > Eric
>
> > > > On Jul 11, 2008, at 3:53 AM, TheBoff wrote:
>
> > > > > To jump straight in to the question:
>
> > > > > I'm wrinting a website using the automatic admin interface, and am
> > > > > wondering if there's any way to create a thumbnail automatically upon
> > > > > the upload of the image.
>
> > > > > I know I could set it as a property, and use PIL to do it on the fly
> > > > > (well I assume I could, I haven't checked it in any detail!), but
> > > > > wouldn't that be hugely processor intensive?
>
> > > --
> > > Regards,
> > > Ben Ford
> > > [EMAIL PROTECTED]
> > > +447792598685
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to