Mercurial > public > sg101
diff gpp/news/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 | e249b5f9d180 |
children | b4305e18d3af |
line wrap: on
line diff
--- a/gpp/news/models.py Sun Mar 28 01:07:47 2010 +0000 +++ b/gpp/news/models.py Sun Mar 28 21:41:11 2010 +0000 @@ -37,7 +37,7 @@ approved = models.BooleanField(default=False) tags = TagField() - def save(self, force_insert = False, force_update = False): + def save(self, *args, **kwargs): if self.approved: Story.objects.create(title=self.title, submitter=self.submitter, @@ -50,7 +50,7 @@ self.delete() cache.delete('home_news') else: - super(PendingStory, self).save(force_insert, force_update) + super(PendingStory, self).save(*args, **kwargs) def __unicode__(self): return self.title @@ -87,7 +87,7 @@ delta = now - self.date_published return delta.days < 30 - def save(self, force_insert=False, force_update=False): - super(Story, self).save(force_insert, force_update) + def save(self, *args, **kwargs): + super(Story, self).save(*args, **kwargs) cache.delete('home_news')