Changeset 400:66a772f18765


Ignore:
Timestamp:
Mar 4, 2012 1:43:11 AM (15 months ago)
Author:
Igor Yanchenko <yanchenko.igor@…>
Branch:
default
Message:

select only last_post field in forum_unreads templatetag

File:
1 edited

Legend:

Unmodified
Added
Removed
  • djangobb_forum/templatetags/forum_extras.py

    r398 r400  
    163163    else: 
    164164        if isinstance(user.posttracking.topics, dict): 
    165             for topic in forum.topics.all(): 
     165            for topic in forum.topics.all().only('last_post'): 
    166166                if topic.last_post_id > user.posttracking.topics.get(str(topic.id), 0): 
    167167                    return True 
Note: See TracChangeset for help on using the changeset viewer.