Mercurial > public > sg101
comparison gpp/forums/models.py @ 232:a46788862737
Implement a forum favorites feature for #82
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sun, 01 Aug 2010 21:26:12 +0000 |
parents | 405468b8e3b9 |
children | dcc929973bba |
comparison
equal
deleted
inserted
replaced
231:a2d388ed106e | 232:a46788862737 |
---|---|
172 view_count = models.IntegerField(blank=True, default=0) | 172 view_count = models.IntegerField(blank=True, default=0) |
173 sticky = models.BooleanField(blank=True, default=False) | 173 sticky = models.BooleanField(blank=True, default=False) |
174 locked = models.BooleanField(blank=True, default=False) | 174 locked = models.BooleanField(blank=True, default=False) |
175 subscribers = models.ManyToManyField(User, related_name='subscriptions', | 175 subscribers = models.ManyToManyField(User, related_name='subscriptions', |
176 verbose_name='subscribers', blank=True) | 176 verbose_name='subscribers', blank=True) |
177 bookmarkers = models.ManyToManyField(User, related_name='favorite_topics', | |
178 verbose_name='bookmarkers', blank=True) | |
177 | 179 |
178 # denormalized fields to reduce database hits | 180 # denormalized fields to reduce database hits |
179 post_count = models.IntegerField(blank=True, default=0) | 181 post_count = models.IntegerField(blank=True, default=0) |
180 update_date = models.DateTimeField() | 182 update_date = models.DateTimeField() |
181 last_post = models.OneToOneField('Post', blank=True, null=True, | 183 last_post = models.OneToOneField('Post', blank=True, null=True, |