diff options
| author | Tim Graham <timograham@gmail.com> | 2018-09-17 15:31:41 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2018-09-17 15:41:17 -0400 |
| commit | 0c20850774e1ba2f408745916e2279592999ee98 (patch) | |
| tree | 49b0a66cbe0451b8eed9373ce198f52c18cf9bf4 | |
| parent | f5e347a6402c1996a8f7063de4b314bae4a55683 (diff) | |
Removed unused admin_url and root_path context variables in admindocs.
Unused since 915ef79b08862680e82d6a772d6ead22735e9a2f and
aaf77c1676e44019abe544911ff7a06eb2690295.
| -rw-r--r-- | django/contrib/admindocs/views.py | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/django/contrib/admindocs/views.py b/django/contrib/admindocs/views.py index a8875a9747..4a70801774 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' |
