<commit_before>from lwimw.models import Contest, user_can_vote
from django.utils import timezone


def common(request):
    contests = Contest.objects.order_by('-start')
    for contest in contests:
        contest.can_vote = request.user.is_authenticated() and user_can_vote(request.user, contest.submissions.all())
    current_contest = contests[0]
    #now = timezone.now()

    return locals()<commit_msg>Update context_processors.py<commit_after>from lwimw.models import Contest, user_can_vote
from django.utils import timezone


def common(request):
    contests = Contest.objects.order_by('-start')
    for contest in contests:
        contest.can_vote = request.user.is_authenticated() and user_can_vote(request.user, contest.submissions.all())
    if contests:
        current_contest = contests[0]
    else:
        current_contest = None
    current_contest = contests[0]
    #now = timezone.now()

    return locals()
{'fraction_non_alphanumeric': 0.09795479009687837, 'fraction_numerical': 0.0032292787944025836, 'mean_word_length': 4.054347826086956, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1332550', 'n_tokens_mistral': 297, 'n_tokens_neox': 280, 'n_words': 63}