<commit_before>from django.views import generic

from braces.views import LoginRequiredMixin

from ..mixins import BazaarPrefixMixin, FilterMixin
from .filters import ListingFilter
from .models import Listing


class ListingListView(LoginRequiredMixin, BazaarPrefixMixin, FilterMixin, generic.ListView):
    model = Listing
    paginate_by = 50

    filter_class = ListingFilter<commit_msg>prefetching stuff on listing view<commit_after>from __future__ import unicode_literals

from django.views import generic

from braces.views import LoginRequiredMixin

from ..mixins import BazaarPrefixMixin, FilterMixin
from .filters import ListingFilter
from .models import Listing


class ListingListView(LoginRequiredMixin, BazaarPrefixMixin, FilterMixin, generic.ListView):
    model = Listing
    paginate_by = 50

    filter_class = ListingFilter

    def get_queryset(self):
        qs = super(ListingListView, self).get_queryset()
        return qs.prefetch_related("listing_sets__product__stock", "publishings__store")
{'fraction_non_alphanumeric': 0.05708661417322835, 'fraction_numerical': 0.003937007874015748, 'mean_word_length': 5.436708860759493, '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': '6055941', 'n_tokens_mistral': 303, 'n_tokens_neox': 285, 'n_words': 79}