<commit_before>from django.http import Http404
from django.shortcuts import render
from django.contrib.admin.views.decorators import staff_member_required

from programs.models import Program


@staff_member_required
def index(request):
    programs = Program.objects.all()
    return render(request, "stat/index.html", {"programs": programs})


@staff_member_required
def instance(request, id):
    program = Program.objects.get(pk=id)
    return render(request, "stats/program.html", {"program": program})<commit_msg>stat app program url#1<commit_after>from django.http import Http404
from django.shortcuts import render
from django.contrib.admin.views.decorators import staff_member_required

from programs.models import Program


@staff_member_required
def index(request):
    programs = Program.objects.all()
    return render(request, "stat/index.html", {"programs": programs})


@staff_member_required
def instance(request, id):
    program = Program.objects.get(pk=id)
    return render(request, "stat/program.html", {"program": program})
{'fraction_non_alphanumeric': 0.10803059273422562, 'fraction_numerical': 0.006692160611854685, 'mean_word_length': 5.8881578947368425, 'pattern_counts': {'":': 4, '<': 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': '6591128', 'n_tokens_mistral': 300, 'n_tokens_neox': 291, 'n_words': 76}