comparison gpp/messages/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 48621ba5c385
children 272d3a8c98e8
comparison
equal deleted inserted replaced
181:500e5875a306 182:5c889b587416
59 if (user == self.sender and self.sender_delete_date is not None) or ( 59 if (user == self.sender and self.sender_delete_date is not None) or (
60 user == self.receiver and self.receiver_delete_date is not None): 60 user == self.receiver and self.receiver_delete_date is not None):
61 return True 61 return True
62 return False 62 return False
63 63
64 def save(self, force_insert = False, force_update = False): 64 def save(self, *args, **kwargs):
65 if not self.id: 65 if not self.id:
66 self.send_date = datetime.datetime.now() 66 self.send_date = datetime.datetime.now()
67 self.html = site_markup(self.message) 67 self.html = site_markup(self.message)
68 super(Message, self).save(force_insert, force_update) 68 super(Message, self).save(*args, **kwargs)
69 69
70 @models.permalink 70 @models.permalink
71 def get_absolute_url(self): 71 def get_absolute_url(self):
72 return ('messages.views.view', [str(self.id)]) 72 return ('messages.views.view', [str(self.id)])
73 73