0001-python3-build-ajax-response-using-text-content-40733.patch
src/authentic2/manager/views.py | ||
---|---|---|
276 | 276 |
# otherwise compute an absolute URI from the relative URI |
277 | 277 |
if location and (not location.startswith('http://') |
278 | 278 |
or not location.startswith('https://') |
279 | 279 |
or not location.startswith('/')): |
280 | 280 |
location = request.build_absolute_uri(location) |
281 | 281 |
data['location'] = location |
282 | 282 |
if hasattr(response, 'render'): |
283 | 283 |
response.render() |
284 |
data['content'] = response.content
|
|
284 |
data['content'] = force_text(response.content)
|
|
285 | 285 |
return HttpResponse(json.dumps(data), content_type='application/json') |
286 | 286 | |
287 | 287 | |
288 | 288 |
class TitleMixin(object): |
289 | 289 |
'''Mixin to provide a title to the view's template''' |
290 | 290 |
title = '' |
291 | 291 | |
292 | 292 |
def get_context_data(self, **kwargs): |
293 |
- |