Fix for snippet sorting of models with capitalized verbose_name.

pull/881/head
Robert Rollins 2014-12-19 12:21:58 -08:00
rodzic f2d90844c7
commit 107bbf6f7f
2 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -13,7 +13,7 @@
<div class="row row-flush title">
<h2>
<a href="{% url 'wagtailsnippets_list' content_type.app_label content_type.model %}" class="col6">
{{ name|capfirst }}
{{ name|capfirst }}
</a>
</h2>
<small class="col6">{{ description }}</small>

Wyświetl plik

@ -82,7 +82,7 @@ def index(request):
if user_can_edit_snippet_type(request.user, content_type)
]
return render(request, 'wagtailsnippets/snippets/index.html', {
'snippet_types': snippet_types,
'snippet_types': sorted(snippet_types, key=lambda x: x[0].lower()),
})