Mercurial > public > sg101
comparison gpp/forums/models.py @ 116:19b64e8f02a2
Fix typo introduced in last commit.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Fri, 23 Oct 2009 03:08:40 +0000 |
parents | 0ce0104c7df3 |
children | 9c18250972d5 |
comparison
equal
deleted
inserted
replaced
115:0ce0104c7df3 | 116:19b64e8f02a2 |
---|---|
329 def __unicode__(self): | 329 def __unicode__(self): |
330 return u'Topic: %d User: %d Date: %s' % (self.topic.id, self.user.id, | 330 return u'Topic: %d User: %d Date: %s' % (self.topic.id, self.user.id, |
331 self.last_visit.strftime('%Y-%m-%d %H:%M:%S')) | 331 self.last_visit.strftime('%Y-%m-%d %H:%M:%S')) |
332 | 332 |
333 def save(self, *args, **kwargs): | 333 def save(self, *args, **kwargs): |
334 if self.id is one: | 334 if self.id is None: |
335 self.touch() | 335 self.touch() |
336 super(TopicLastVisit, self).save(*args, **kwargs) | 336 super(TopicLastVisit, self).save(*args, **kwargs) |
337 | 337 |
338 def touch(self): | 338 def touch(self): |
339 self.last_visit = datetime.datetime.now() | 339 self.last_visit = datetime.datetime.now() |