Mercurial > public > sg101
comparison gpp/comments/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 | 91a01b8b5885 |
children | 254db4cb6a86 |
comparison
equal
deleted
inserted
replaced
181:500e5875a306 | 182:5c889b587416 |
---|---|
49 ordering = ('creation_date', ) | 49 ordering = ('creation_date', ) |
50 | 50 |
51 def __unicode__(self): | 51 def __unicode__(self): |
52 return u'%s: %s...' % (self.user.username, self.comment[:50]) | 52 return u'%s: %s...' % (self.user.username, self.comment[:50]) |
53 | 53 |
54 def save(self, force_insert=False, force_update=False): | 54 def save(self, *args, **kwargs): |
55 self.html = site_markup(self.comment) | 55 self.html = site_markup(self.comment) |
56 super(Comment, self).save(force_insert, force_update) | 56 super(Comment, self).save(*args, **kwargs) |
57 | 57 |
58 def get_absolute_url(self): | 58 def get_absolute_url(self): |
59 return self.get_content_object_url() + ('#c%s' % self.id) | 59 return self.get_content_object_url() + ('#c%s' % self.id) |
60 | 60 |
61 def get_content_object_url(self): | 61 def get_content_object_url(self): |