you self.instance.fieldname use this ur from .
On Tue, Nov 10, 2009 at 12:58 PM, Ramdas S wrote:
> Hi,
>
> I have this app which has an ImageField, where the image needs to be
> cropped, resized, and a few effects (all from PIL) are applied on it, the
> model looks something like this
>
> class
Hi,
I have this app which has an ImageField, where the image needs to be
cropped, resized, and a few effects (all from PIL) are applied on it, the
model looks something like this
class MidPanel(models.Model):
.
image = models.ImageField(upload_to="images"):
def save(self):
You can check whether there is instance or not by self.instance .This will
tell u that whether it is change (page)or a new object is added.And if it
new object then only call ur custom functions.U can also use changeForm
function
On Tue, Nov 10, 2009 at 12:39 PM, Ramdas S wrote:
> Hi,
>
> I have
Hi,
I have this app which has an ImageField, where the image needs to be
cropped, resized, and a few effects (all from PIL) are applied on it, the
model looks something like this
class MidPanel(models.Model):
.
image = models.ImageField(upload_to="imgs")
def save(self):
4 matches
Mail list logo