def get(self, request, repo, slug):
        condition = Q()
        for name in get_search_names(slug):
            condition |= Q(name__iexact=name)

        try:
            package = self.repository.packages.get(condition)
        except __HOLE__:
            if not self.repository.enable_auto_mirroring:
                raise Http404("Auto mirroring is not enabled")

            enqueue(fetch_package, self.repository.pk, slug)
            return redirect(self.repository.upstream_pypi_url + '/' + slug)

        # Redirect if slug is not an exact match
        if slug != package.name:
            url = reverse('packages:simple_detail', kwargs={
                'repo': self.repository.slug,
                'slug': package.name
            })
            return redirect(url)

        self.object = package
        context = self.get_context_data(
            object=self.object,
            releases=list(package.releases.all()))
        return self.render_to_response(context)
dataset/ETHPy150Open mvantellingen/localshop/localshop/apps/packages/views.py/SimpleDetail.get