<commit_before>from django.shortcuts import render


def home(request):
    return render(request, "home.html", locals())<commit_msg>Serve the latest resources of all kinds on the homepage<commit_after>from django.shortcuts import render

from resources.models import Resource


def home(request):
    audios = Resource.audios.all()[:5]
    documents = Resource.documents.all()[:5]
    images = Resource.images.all()[:5]
    videos = Resource.videos.all()[:5]
    others = Resource.others.all()[:5]
    return render(request, "home.html", locals())
{'fraction_non_alphanumeric': 0.1332116788321168, 'fraction_numerical': 0.009124087591240875, 'mean_word_length': 4.778947368421052, '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': '1057265', 'n_tokens_mistral': 166, 'n_tokens_neox': 159, 'n_words': 42}