Mercurial > public > sg101
comparison gpp/messages/models.py @ 429:d0f0800eef0c
Making the jquery tabbed version of the messages app the current version and removing the old. Also figured out how to dynamically update the base template's count of unread messages when messages are read.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Tue, 03 May 2011 02:56:58 +0000 |
parents | 76ba9478ebbd |
children |
comparison
equal
deleted
inserted
replaced
428:77b3b01843b5 | 429:d0f0800eef0c |
---|---|
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(*args, **kwargs) | 68 super(Message, self).save(*args, **kwargs) |
69 | 69 |
70 @models.permalink | |
71 def get_absolute_url(self): | |
72 return ('messages.views.view', [str(self.id)]) | |
73 | |
74 def __unicode__(self): | 70 def __unicode__(self): |
75 return self.subject | 71 return self.subject |
76 | 72 |
77 class Meta: | 73 class Meta: |
78 ordering = ('-send_date', ) | 74 ordering = ('-send_date', ) |