Removed unused admin_url and root_path context variables in admindocs.

Unused since 915ef79b08 and
aaf77c1676.
This commit is contained in:
Tim Graham 2018-09-17 15:31:41 -04:00
parent f5e347a640
commit 0c20850774
1 changed files with 1 additions and 10 deletions

View File

@ -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'