Mercurial > public > sg101
diff gpp/potd/models.py @ 182:5c889b587416
Fixing #64. Updating all model save() methods to use *args and **kwargs. Django 1.2 has new keyword arguments.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sun, 28 Mar 2010 21:41:11 +0000 |
parents | 7b6540b185d9 |
children | 3c951521e0ec |
line wrap: on
line diff
--- a/gpp/potd/models.py Sun Mar 28 01:07:47 2010 +0000 +++ b/gpp/potd/models.py Sun Mar 28 21:41:11 2010 +0000 @@ -44,7 +44,7 @@ def get_absolute_url(self): return ('potd-archive', [str(self.id)]) - def save(self, force_insert=False, force_update=False): + def save(self, *args, **kwargs): if self.thumb: self.thumb.delete(save=False) @@ -60,7 +60,7 @@ thumb_name = os.path.basename(self.photo.path) self.thumb.save(thumb_name, ContentFile(s.getvalue()), save=False) - super(Photo, self).save(force_insert, force_update) + super(Photo, self).save(*args, **kwargs) Sequence.objects.insert_photo(self.pk) def delete(self):