from .models import Thread


def user_messages(request):
    c = {}
    if request.user.is_authenticated():
        c["inbox_count"] = Thread.inbox(request.user).count()
    return c

from .models import Thread


def user_messages(request):
    c = {}
    if request.user.is_authenticated():
        c["inbox_threads"] = Thread.inbox(request.user)
        c["unread_threads"] = Thread.unread(request.user)
    return c

Return querysets in context processor to be more useful
Return querysets in context processor to be more useful
