~netlandish/django-wiki

6d9455aa8f804afc203f138a7a7ef46177fb142a — Gustavo Morero 7 years ago bb9a192 + 9170b06
Merge pull request #1 from petersanchez/patch-1

Making query case insensitive
1 files changed, 2 insertions(+), 2 deletions(-)

M wiki/plugins/links/views.py
M wiki/plugins/links/views.py => wiki/plugins/links/views.py +2 -2
@@ 20,12 20,12 @@ class QueryUrlPath(View):
        if query:
            matches = models.URLPath.objects.can_read(
                request.user).active().filter(
                article__current_revision__title__contains=query,
                article__current_revision__title__icontains=query,
                article__current_revision__deleted=False,
            )
            matches = matches.select_related_common()
            return [("[%s](wiki:%s)") %
                    (m.article.current_revision.title, '/' +
                     m.path.strip("/")) for m in matches[:max_num]]
                     m.path) for m in matches[:max_num]]

        return []