2012-03-28 27 views
0

當用戶Django的HttpResponsePermanentRedirect重定向:約Django的HttpResponsePermanentRedirect到Android市場的URL不起作用

redirect_to = 'market://details?id=com.example.your.package' 
if redirect_to: 
    return HttpResponsePermanentRedirect(redirect_to) 
else : 
    return EMPTY_GIF 

redirect_to就像http://...它工作正常的URL,但是當它是Android Market的URL瀏覽器(在PC上)始終處於等待狀態,並且捲曲得到400(錯誤請求)

回答

3

是一種自定義URL方案,用於從智能手機鏈接到marketplace應用程序。 Read this guide,你需要像這樣鏈接:

http://play.google.com/store/search?id=<query> 

編輯 通知,您可以使用search?id=search?q=search?pub=(如在文檔的底部所提及的)