diff --git a/django/contrib/admindocs/views.py b/django/contrib/admindocs/views.py index a8875a9747c..4a708017749 100644 --- a/django/contrib/admindocs/views.py +++ b/django/contrib/admindocs/views.py @@ -14,7 +14,7 @@ from django.core.exceptions import ImproperlyConfigured, ViewDoesNotExist from django.db import models from django.http import Http404 from django.template.engine import Engine -from django.urls import get_mod_func, get_resolver, get_urlconf, reverse +from django.urls import get_mod_func, get_resolver, get_urlconf from django.utils.decorators import method_decorator from django.utils.inspect import ( func_accepts_kwargs, func_accepts_var_args, get_func_full_args, @@ -44,7 +44,6 @@ class BaseAdminDocsView(TemplateView): def get_context_data(self, **kwargs): return super().get_context_data(**{ **kwargs, - 'root_path': reverse('admin:index'), **admin.site.each_context(self.request), }) @@ -52,14 +51,6 @@ class BaseAdminDocsView(TemplateView): class BookmarkletsView(BaseAdminDocsView): template_name = 'admin_doc/bookmarklets.html' - def get_context_data(self, **kwargs): - context = super().get_context_data(**kwargs) - context.update({ - 'admin_url': "%s://%s%s" % ( - self.request.scheme, self.request.get_host(), context['root_path']) - }) - return context - class TemplateTagIndexView(BaseAdminDocsView): template_name = 'admin_doc/template_tag_index.html'