fix haystack search
This commit is contained in:
parent
18ec1439ff
commit
f46fce38d7
3 changed files with 7 additions and 7 deletions
|
@ -14,23 +14,23 @@
|
||||||
{% if results %}
|
{% if results %}
|
||||||
{% for post in results %}
|
{% for post in results %}
|
||||||
<div class="blockpost searchposts roweven">
|
<div class="blockpost searchposts roweven">
|
||||||
<h2>{% link post.instance.topic.forum %} » {% link post.instance.topic %} » <a href="{{ post.instance.get_absolute_url }}">{% forum_time post.instance.created %}</a></h2>
|
<h2>{% link post.object.topic.forum %} » {% link post.object.topic %} » <a href="{{ post.object.get_absolute_url }}">{% forum_time post.object.created %}</a></h2>
|
||||||
|
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<div class="inbox">
|
<div class="inbox">
|
||||||
<div class="postleft">
|
<div class="postleft">
|
||||||
<dl>
|
<dl>
|
||||||
<dt><strong><a href="{% url djangobb:forum_profile post.instance.user %}">{{ post.instance.user }}</a></strong></dt>
|
<dt><strong><a href="{% url djangobb:forum_profile post.object.user %}">{{ post.object.user }}</a></strong></dt>
|
||||||
<dd>{% trans "Replies:" %} {{ post.instance.topic.post_count }}</dd>
|
<dd>{% trans "Replies:" %} {{ post.object.topic.post_count }}</dd>
|
||||||
<dd><div class="icon"><div class="nosize"><!-- --></div></div>
|
<dd><div class="icon"><div class="nosize"><!-- --></div></div>
|
||||||
</dd>
|
</dd>
|
||||||
|
|
||||||
<dd><p class="clearb"><a href="{{ post.instance.get_absolute_url }}">{% trans "Go to post" %}</a></p></dd>
|
<dd><p class="clearb"><a href="{{ post.object.get_absolute_url }}">{% trans "Go to post" %}</a></p></dd>
|
||||||
</dl>
|
</dl>
|
||||||
</div>
|
</div>
|
||||||
<div class="postright">
|
<div class="postright">
|
||||||
<div class="postmsg">
|
<div class="postmsg">
|
||||||
{{ post.instance.body_html|safe }}
|
{{ post.object.body_html|safe }}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -178,7 +178,7 @@ def search(request):
|
||||||
|
|
||||||
if 'topics' in request.GET['show_as']:
|
if 'topics' in request.GET['show_as']:
|
||||||
topics = []
|
topics = []
|
||||||
topics_to_exclude = []
|
topics_to_exclude = SQ()
|
||||||
for post in posts:
|
for post in posts:
|
||||||
if post.object.topic not in topics:
|
if post.object.topic not in topics:
|
||||||
if post.object.topic.forum.category.has_access(request.user):
|
if post.object.topic.forum.category.has_access(request.user):
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
Django>=1.2
|
Django>=1.2
|
||||||
PIL>=1.1.7
|
PIL>=1.1.7
|
||||||
django-haystack>=1.1.0
|
django-haystack>=1.2.5
|
||||||
south
|
south
|
||||||
django-messages==0.4.4
|
django-messages==0.4.4
|
||||||
pygments
|
pygments
|
||||||
|
|
Reference in a new issue