<commit_before>from __future__ import absolute_import, unicode_literals

from django.core.urlresolvers import resolve
from django.http import Http404
from django.utils.encoding import force_text
from django.utils.translation import ugettext_lazy as _

from debug_toolbar.panels import Panel
from debug_toolbar.utils import get_name_from_obj


class RequestPanel(Panel):
    """
    A panel to display request variables (POST/GET, session, cookies).
    """
    template = 'debug_toolbar/panels/request.html'

    title = _("Request")

    @property
    def nav_subtitle(self):
        """
        Show abbreviated name of view function as subtitle
        """<commit_msg>Prevent DeprecationWarnings because of django.core.urlresolvers<commit_after>from __future__ import absolute_import, unicode_literals

from django.http import Http404
from django.utils.encoding import force_text
from django.utils.translation import ugettext_lazy as _

from debug_toolbar.panels import Panel
from debug_toolbar.utils import get_name_from_obj

try:
    from django.urls import resolve
except:  # Django < 1.10 pragma: no cover
    from django.core.urlresolvers import resolve


class RequestPanel(Panel):
    """
    A panel to display request variables (POST/GET, session, cookies).
    """
    template = 'debug_toolbar/panels/request.html'

    title = _("Request")

    @property
    def nav_subtitle(self):
        """
        Show abbreviated name of view function as subtitle
        """
{'fraction_non_alphanumeric': 0.0722972972972973, 'fraction_numerical': 0.006081081081081081, 'mean_word_length': 3.9366666666666665, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7635863', 'n_tokens_mistral': 427, 'n_tokens_neox': 407, 'n_words': 127}