<commit_before>from django.views.generic import TemplateView

from wye.organisations.models import Organisation
from wye.workshops.models import Workshop
from wye.profiles.models import Profile
from .constants import WorkshopStatus

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

    def get_context_data(self, **kwargs):
        context =  super(HomePageView, self).get_context_data(**kwargs)
        context['organisation_registered_count'] = Organisation.objects.filter(active=True).count()
        context['completed_workshop_count'] = Workshop.objects.filter(status=WorkshopStatus.COMPLETED).count()
        context['tutor_registered_count'] = Profile.objects.filter(usertype__slug="tutor").count()
        return context<commit_msg>pep8 changes<commit_after>from django.views.generic import TemplateView

from wye.organisations.models import Organisation
from wye.workshops.models import Workshop
from wye.profiles.models import Profile
from .constants import WorkshopStatus


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

    def get_context_data(self, **kwargs):
        context = super(HomePageView, self).get_context_data(**kwargs)
        context['organisation_registered_count'] = Organisation.objects.filter(active=True).count()
        context['completed_workshop_count'] = Workshop.objects.filter(status=WorkshopStatus.COMPLETED).count()
        context['tutor_registered_count'] = Profile.objects.filter(usertype__slug="tutor").count()
        return context
{'fraction_non_alphanumeric': 0.1001977587343441, 'fraction_numerical': 0.0006591957811470006, 'mean_word_length': 5.543103448275862, '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': '4394918', 'n_tokens_mistral': 432, 'n_tokens_neox': 408, 'n_words': 76}