Pārlūkot izejas kodu

Merge branch 'dev' of github.com:geex-arts/django-jet into dev

Denis K 8 gadi atpakaļ
vecāks
revīzija
725ff0443b

BIN
jet/dashboard/locale/de/LC_MESSAGES/django.mo


+ 1 - 1
jet/dashboard/locale/de/LC_MESSAGES/django.po

@@ -260,7 +260,7 @@ msgid "You must install the FeedParser python module"
 msgstr "Bitte FeedParser Python modul installieren"
 
 msgid "You must provide a valid feed URL"
-msgstr "Bitte eine valide feed URL angeben"
+msgstr "Bitte eine gültige Feed URL angeben"
 
 msgid "Delete widget"
 msgstr "Widget löschen"

+ 2 - 4
jet/dashboard/templatetags/jet_dashboard_tags.py

@@ -1,6 +1,5 @@
 from __future__ import unicode_literals
 from django import template
-from django.core.urlresolvers import resolve
 from jet.dashboard.utils import get_current_dashboard
 
 register = template.Library()
@@ -10,7 +9,6 @@ register = template.Library()
 def get_dashboard(context, location):
     dashboard_cls = get_current_dashboard(location)
 
-    resolver = resolve(context['request'].path)
-    app_label = resolver.kwargs.get('app_label')
+    app_label = context['request'].resolver_match.kwargs.get('app_label')
 
-    return dashboard_cls(context, app_label=app_label)
+    return dashboard_cls(context, app_label=app_label)

+ 2 - 1
jet/templatetags/jet_tags.py

@@ -7,6 +7,7 @@ from django.forms import CheckboxInput, ModelChoiceField, Select, ModelMultipleC
 from django.contrib.admin.widgets import RelatedFieldWidgetWrapper
 from django.utils.formats import get_format
 from django.utils.safestring import mark_safe
+from django.utils.encoding import smart_text
 from jet import settings, VERSION
 from jet.models import Bookmark, PinnedApplication
 from jet.utils import get_app_list, get_model_instance_label, get_model_queryset, get_possible_language_codes, \
@@ -267,7 +268,7 @@ def jet_popup_response_data(context):
     return json.dumps({
         'action': context.get('action'),
         'value': context.get('value') or context.get('pk_value'),
-        'obj': str(context.get('obj')),
+        'obj': smart_text(context.get('obj')),
         'new_value': context.get('new_value')
     })