From 6afc15c3950f453af4c6980634dde236f6dfde82 Mon Sep 17 00:00:00 2001 From: Matt Westcott Date: Fri, 27 Feb 2015 16:14:28 +0000 Subject: [PATCH] fix wagtailsnippets_edit URL params on snippet_chooser. Using target_content_type instead of target_content_type.model apparently meant that we were using the verbose name, causing it to fall over when that contained spaces --- .../templates/wagtailsnippets/widgets/snippet_chooser.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wagtail/wagtailsnippets/templates/wagtailsnippets/widgets/snippet_chooser.html b/wagtail/wagtailsnippets/templates/wagtailsnippets/widgets/snippet_chooser.html index 07425a633..7fad56f68 100644 --- a/wagtail/wagtailsnippets/templates/wagtailsnippets/widgets/snippet_chooser.html +++ b/wagtail/wagtailsnippets/templates/wagtailsnippets/widgets/snippet_chooser.html @@ -6,4 +6,4 @@ {{ item }} {% endblock %} -{% block edit_chosen_item_url %}{% if item %}{% url 'wagtailsnippets_edit' widget.target_content_type.app_label widget.target_content_type item.id %}{% endif %}{% endblock %} +{% block edit_chosen_item_url %}{% if item %}{% url 'wagtailsnippets_edit' widget.target_content_type.app_label widget.target_content_type.model item.id %}{% endif %}{% endblock %}