conf_site/reviews/templatetags/review_tags.py
def user_score(proposal, user):
    """For the selected proposal, display the current user's review score."""
    # Try to retrieve score from cache.
    score_cache_key = proposalvote_score_cache_key(proposal, user)
    cached_score = cache.get(score_cache_key)
    if cached_score:
        return cached_score
    try:
        uncached_score = ProposalVote.objects.get(
            proposal=proposal, voter=user
        ).get_numeric_score_display()
    except ProposalVote.DoesNotExist:
        uncached_score = " "
    cache.set(score_cache_key, uncached_score, settings.CACHE_TIMEOUT_LONG)
    return uncached_score
For the selected proposal, display the current user's review score.
For the selected proposal, display the current user's review score.
For the selected proposal display the current user ' s review score .
def user_score(proposal, user):
    score_cache_key = proposalvote_score_cache_key(proposal, user)
    cached_score = cache.get(score_cache_key)
    if cached_score:
        return cached_score
    try:
        uncached_score = ProposalVote.objects.get(
            proposal=proposal, voter=user
        ).get_numeric_score_display()
    except ProposalVote.DoesNotExist:
        uncached_score = " "
    cache.set(score_cache_key, uncached_score, settings.CACHE_TIMEOUT_LONG)
    return uncached_score
def user_score ( proposal , user ) : score_cache_key = proposalvote_score_cache_key ( proposal , user ) cached_score = cache . get ( score_cache_key ) if cached_score : return cached_score try : uncached_score = ProposalVote . objects . get ( proposal = proposal , voter = user ) . get_numeric_score_display ( ) except ProposalVote . DoesNotExist : uncached_score = " " cache . set ( score_cache_key , uncached_score , settings . CACHE_TIMEOUT_LONG ) return uncached_score
For the selected proposal, display the current user's review score.
For the selected proposal display the current user ' s review score .
"""For the selected proposal, display the current user's review score.""" # Try to retrieve score from cache.
proposal
user