from __future__ import unicode_literals
from django import template
from jet.dashboard.utils import get_current_dashboard

register = template.Library()


@register.assignment_tag(takes_context=True)
def get_dashboard(context, location):
    dashboard_cls = get_current_dashboard(location)

    app_label = context['request'].resolver_match.kwargs.get('app_label')

    return dashboard_cls(context, app_label=app_label)


@register.filter()
def format_change_message(log_entry):

    # Django 1.9+
    if hasattr(log_entry, "get_change_message"):
        return log_entry.get_change_message()
    else:
        return log_entry.change_message

@@ -61,16 +61,61 @@
 emplate%0A
+from django.core.urlresolvers import resolve%0A
 from jet
@@ -337,47 +337,76 @@
     
-app_label = context%5B'request'%5D.
+resolver = resolve(context%5B'request'%5D.path)%0A    app_label = 
 resolver
 _mat
@@ -405,14 +405,8 @@
 lver
-_match
 .kwa

Fix rebase.