(request, *args, **kwargs)
| 233 | """ |
| 234 | |
| 235 | def inner(request, *args, **kwargs): |
| 236 | if not self.has_permission(request): |
| 237 | if request.path == reverse("admin:logout", current_app=self.name): |
| 238 | index_path = reverse("admin:index", current_app=self.name) |
| 239 | return HttpResponseRedirect(index_path) |
| 240 | # Inner import to prevent django.contrib.admin (app) from |
| 241 | # importing django.contrib.auth.models.User (unrelated model). |
| 242 | from django.contrib.auth.views import redirect_to_login |
| 243 | |
| 244 | return redirect_to_login( |
| 245 | request.get_full_path(), |
| 246 | reverse("admin:login", current_app=self.name), |
| 247 | ) |
| 248 | return view(request, *args, **kwargs) |
| 249 | |
| 250 | if not cacheable: |
| 251 | inner = never_cache(inner) |
nothing calls this directly
no test coverage detected