Changeset 380:1d49a0460392


Ignore:
Timestamp:
Oct 11, 2011 2:35:07 PM (21 months ago)
Author:
slav0nic <slav0nic0@…>
Branch:
default
Message:

fix haystack search

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • djangobb_forum/templates/djangobb_forum/search_posts.html

    r372 r380  
    1515{% for post in results %} 
    1616<div class="blockpost searchposts roweven"> 
    17         <h2>{% link post.instance.topic.forum %}&nbsp;&raquo;&nbsp;{% link post.instance.topic %}&nbsp;&raquo;&nbsp;<a href="{{ post.instance.get_absolute_url }}">{% forum_time post.instance.created %}</a></h2> 
     17        <h2>{% link post.object.topic.forum %}&nbsp;&raquo;&nbsp;{% link post.object.topic %}&nbsp;&raquo;&nbsp;<a href="{{ post.object.get_absolute_url }}">{% forum_time post.object.created %}</a></h2> 
    1818 
    1919        <div class="box"> 
     
    2121                        <div class="postleft"> 
    2222                                <dl> 
    23                                         <dt><strong><a href="{% url djangobb:forum_profile post.instance.user %}">{{ post.instance.user }}</a></strong></dt> 
    24                                         <dd>{% trans "Replies:" %} {{ post.instance.topic.post_count }}</dd> 
     23                                        <dt><strong><a href="{% url djangobb:forum_profile post.object.user %}">{{ post.object.user }}</a></strong></dt> 
     24                                        <dd>{% trans "Replies:" %} {{ post.object.topic.post_count }}</dd> 
    2525                                        <dd><div class="icon"><div class="nosize"><!-- --></div></div> 
    2626</dd> 
    2727 
    28                                         <dd><p class="clearb"><a href="{{ post.instance.get_absolute_url }}">{% trans "Go to post" %}</a></p></dd> 
     28                                        <dd><p class="clearb"><a href="{{ post.object.get_absolute_url }}">{% trans "Go to post" %}</a></p></dd> 
    2929                                </dl> 
    3030                        </div> 
    3131                        <div class="postright"> 
    3232                                <div class="postmsg"> 
    33                                         {{ post.instance.body_html|safe }} 
     33                                        {{ post.object.body_html|safe }} 
    3434 
    3535                                </div> 
  • djangobb_forum/views.py

    r378 r380  
    179179            if 'topics' in request.GET['show_as']: 
    180180                topics = [] 
    181                 topics_to_exclude = [] 
     181                topics_to_exclude = SQ() 
    182182                for post in posts: 
    183183                    if post.object.topic not in topics: 
  • extras/requirements.txt

    r373 r380  
    11Django>=1.2 
    22PIL>=1.1.7 
    3 django-haystack>=1.1.0 
     3django-haystack>=1.2.5 
    44south 
    55django-messages==0.4.4 
Note: See TracChangeset for help on using the changeset viewer.