Mercurial > public > sg101
comparison gpp/weblinks/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 | 952e05cb3d80 |
children | 046e6ef0ff45 |
comparison
equal
deleted
inserted
replaced
181:500e5875a306 | 182:5c889b587416 |
---|---|
69 approved = models.BooleanField(default = False, | 69 approved = models.BooleanField(default = False, |
70 help_text = 'Check this and save to remove the referenced link from the database') | 70 help_text = 'Check this and save to remove the referenced link from the database') |
71 | 71 |
72 objects = FlaggedLinkManager() | 72 objects = FlaggedLinkManager() |
73 | 73 |
74 def save(self, force_insert = False, force_update = False): | 74 def save(self, *args, **kwargs): |
75 if self.approved: | 75 if self.approved: |
76 self.link.delete() | 76 self.link.delete() |
77 self.delete() | 77 self.delete() |
78 else: | 78 else: |
79 super(FlaggedLink, self).save(force_insert, force_update) | 79 super(FlaggedLink, self).save(*args, **kwargs) |
80 | 80 |
81 def url(self): | 81 def url(self): |
82 return self.link.url | 82 return self.link.url |
83 | 83 |
84 def get_link_url(self): | 84 def get_link_url(self): |