Show More
@@ -180,6 +180,10 b' class PostForm(NeboardForm):' | |||
|
180 | 180 | def _validate_posting_speed(self): |
|
181 | 181 | can_post = True |
|
182 | 182 | |
|
183 | # TODO Remove this, it's only for test | |
|
184 | if not 'user_id' in self.session: | |
|
185 | return | |
|
186 | ||
|
183 | 187 | user = User.objects.get(id=self.session['user_id']) |
|
184 | 188 | if user.is_veteran(): |
|
185 | 189 | posting_delay = VETERAN_POSTING_DELAY |
@@ -427,7 +427,9 b' class Thread(models.Model):' | |||
|
427 | 427 | Gets sorted thread posts |
|
428 | 428 | """ |
|
429 | 429 | |
|
430 | return self.replies.all().order_by('pub_time') | |
|
430 | # return self.replies.all().order_by('pub_time') | |
|
431 | return self.replies.all().order_by('pub_time').prefetch_related( | |
|
432 | 'referenced_posts') | |
|
431 | 433 | |
|
432 | 434 | def add_tag(self, tag): |
|
433 | 435 | """ |
General Comments 0
You need to be logged in to leave comments.
Login now