Skip to content
Permalink
Browse files

Handle strings containing non-ascii characters (#82)

* Handle strings containing non-ascii characters

* import future for python 2/3 compatibility

* Handle strings containing non-ascii characters (python compatibility)

* add `future` dependency to travis build

* add `future` dependency to setup.py

* remove dependency

* remove dependency

* remove dependency

* remove dependency

* refactor

* use six

* sort imports
  • Loading branch information
ondrejchmelar authored and tomchristie committed Mar 29, 2019
1 parent 8ae6d15 commit 43f9bb3694ab92b8851e8c5a954408ba28956677
Showing with 2 additions and 1 deletion.
  1. +2 −1 vanilla/model_views.py
@@ -5,6 +5,7 @@
from django.http import Http404, HttpResponseRedirect
from django.shortcuts import get_object_or_404
from django.template.response import TemplateResponse
from django.utils import six
from django.utils.translation import ugettext as _
from django.views.generic import View
import warnings
@@ -132,7 +133,7 @@ def paginate_queryset(self, queryset, page_size):
return paginator.page(page_number)
except InvalidPage as exc:
msg = 'Invalid page (%s): %s'
raise Http404(_(msg % (page_number, str(exc))))
raise Http404(_(msg % (page_number, six.text_type(exc))))

# Response rendering

0 comments on commit 43f9bb3

Please sign in to comment.
You can’t perform that action at this time.