Show More
@@ -180,6 +180,10 b' class PostForm(NeboardForm):' | |||||
180 | def _validate_posting_speed(self): |
|
180 | def _validate_posting_speed(self): | |
181 | can_post = True |
|
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 | user = User.objects.get(id=self.session['user_id']) |
|
187 | user = User.objects.get(id=self.session['user_id']) | |
184 | if user.is_veteran(): |
|
188 | if user.is_veteran(): | |
185 | posting_delay = VETERAN_POSTING_DELAY |
|
189 | posting_delay = VETERAN_POSTING_DELAY |
@@ -427,7 +427,9 b' class Thread(models.Model):' | |||||
427 | Gets sorted thread posts |
|
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 | def add_tag(self, tag): |
|
434 | def add_tag(self, tag): | |
433 | """ |
|
435 | """ |
@@ -68,7 +68,7 b'' | |||||
68 | {{ post.text.rendered }} |
|
68 | {{ post.text.rendered }} | |
69 | {% endif %} |
|
69 | {% endif %} | |
70 | {% endautoescape %} |
|
70 | {% endautoescape %} | |
71 |
{% with refposts=post. |
|
71 | {% with refposts=post.referenced_posts.all %} | |
72 | {% if refposts %} |
|
72 | {% if refposts %} | |
73 | <div class="refmap"> |
|
73 | <div class="refmap"> | |
74 | {% trans "Replies" %}: |
|
74 | {% trans "Replies" %}: |
General Comments 0
You need to be logged in to leave comments.
Login now