Django 1.4 - Redirect to Non-HTTP urls

前端 未结 1 582
时光说笑
时光说笑 2021-02-05 16:57

We have a view which redirects to a Non-HTTP url scheme. Its used in an iOS app. But since we have upgraded to Django1.4 we are getting a crash when this redirect code is execut

相关标签:
1条回答
  • 2021-02-05 17:22

    I believe you'll need to have a custom Response object, consider following:

    response = HttpResponse("", status=302)
    response['Location'] = "appdev://..."
    return response
    
    0 讨论(0)
提交回复
热议问题