1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Refs #23919 -- Removed some Python 2 compatibility code and comments.

This commit is contained in:
Mads Jensen
2017-03-27 19:12:27 +02:00
committed by Tim Graham
parent 6585ebebaa
commit ed0cbc8d8b
3 changed files with 6 additions and 19 deletions

View File

@@ -168,13 +168,6 @@ class ViewDetailView(BaseAdminDocsView):
# the module and class.
mod, klass = get_mod_func(mod)
return getattr(getattr(import_module(mod), klass), func)
except AttributeError:
# PY2 generates incorrect paths for views that are methods,
# e.g. 'mymodule.views.ViewContainer.my_view' will be
# listed as 'mymodule.views.my_view' because the class name
# can't be detected. This causes an AttributeError when
# trying to resolve the view.
return None
def get_context_data(self, **kwargs):
view = self.kwargs['view']