Removed unused admin_url and root_path context variables in admindocs.
Unused since915ef79b08
andaaf77c1676
.
This commit is contained in:
parent
f5e347a640
commit
0c20850774
|
@ -14,7 +14,7 @@ from django.core.exceptions import ImproperlyConfigured, ViewDoesNotExist
|
||||||
from django.db import models
|
from django.db import models
|
||||||
from django.http import Http404
|
from django.http import Http404
|
||||||
from django.template.engine import Engine
|
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.decorators import method_decorator
|
||||||
from django.utils.inspect import (
|
from django.utils.inspect import (
|
||||||
func_accepts_kwargs, func_accepts_var_args, get_func_full_args,
|
func_accepts_kwargs, func_accepts_var_args, get_func_full_args,
|
||||||
|
@ -44,7 +44,6 @@ class BaseAdminDocsView(TemplateView):
|
||||||
def get_context_data(self, **kwargs):
|
def get_context_data(self, **kwargs):
|
||||||
return super().get_context_data(**{
|
return super().get_context_data(**{
|
||||||
**kwargs,
|
**kwargs,
|
||||||
'root_path': reverse('admin:index'),
|
|
||||||
**admin.site.each_context(self.request),
|
**admin.site.each_context(self.request),
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -52,14 +51,6 @@ class BaseAdminDocsView(TemplateView):
|
||||||
class BookmarkletsView(BaseAdminDocsView):
|
class BookmarkletsView(BaseAdminDocsView):
|
||||||
template_name = 'admin_doc/bookmarklets.html'
|
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):
|
class TemplateTagIndexView(BaseAdminDocsView):
|
||||||
template_name = 'admin_doc/template_tag_index.html'
|
template_name = 'admin_doc/template_tag_index.html'
|
||||||
|
|
Loading…
Reference in New Issue