Gives HttpResponse bytes
This commit is contained in:
parent
2ae656a77a
commit
d09e798dd6
1 changed files with 2 additions and 1 deletions
|
@ -20,6 +20,7 @@ from django.conf import settings
|
||||||
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
|
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
|
||||||
from django.http import HttpResponse, HttpResponseBadRequest
|
from django.http import HttpResponse, HttpResponseBadRequest
|
||||||
from django.utils.translation import ugettext as _
|
from django.utils.translation import ugettext as _
|
||||||
|
from django.utils.encoding import smart_bytes
|
||||||
from django.core.urlresolvers import reverse
|
from django.core.urlresolvers import reverse
|
||||||
from django.core.validators import URLValidator, ValidationError
|
from django.core.validators import URLValidator, ValidationError
|
||||||
|
|
||||||
|
@ -198,7 +199,7 @@ class MapsShowCase(View):
|
||||||
"type": "FeatureCollection",
|
"type": "FeatureCollection",
|
||||||
"features": [make(m) for m in maps]
|
"features": [make(m) for m in maps]
|
||||||
}
|
}
|
||||||
return HttpResponse(json.dumps(geojson))
|
return HttpResponse(smart_bytes(json.dumps(geojson)))
|
||||||
|
|
||||||
showcase = MapsShowCase.as_view()
|
showcase = MapsShowCase.as_view()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue