<commit_before>from django.shortcuts import render
from .models import Photos
from django.views.generic import TemplateView


class IndexView(TemplateView):
    template_name = 'index.html'

    def get(self, request, *args, **kwargs):
        p = Photos.objects.filter(published='public').order_by('?').first()
        context = {
            'photo': p
        }
        return render(request, self.template_name, context=context)<commit_msg>Fixing merge conflict.<commit_after>from django.shortcuts import render
from .models import Photos
from django.views.generic import TemplateView


class IndexView(TemplateView):
    template_name = 'index.html'

    def get_context_data(self, **kwargs):
        p = Photos.objects.filter(published='public').order_by('?').first()
        context = super(IndexView, self).get_context_data(**kwargs)
        context['photo'] = p
        return context
{'fraction_non_alphanumeric': 0.11646136618141098, 'fraction_numerical': 0.0, 'mean_word_length': 3.7807486631016043, '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': '6180696', 'n_tokens_mistral': 252, 'n_tokens_neox': 239, 'n_words': 59}