

def get(self, request, *args, **kwargs):
    self.object = self.get_object()
    if (self.object.name != self.kwargs.get(context.slug_url_kwarg, None)):
        return HttpResponsePermanentRedirect(reverse('simple_package_detail', kwargs={
            'slug': self.object.name,
        }))
    context = self.get_context_data(object=self.object)
    return self.render_to_response(context)

dataset/ETHPy150Open crate-archive/crate-site/crateweb/apps/packages/simple/views.py PackageDetail.get/VarMisuse@42/44 `self`->`context`