任何人都知道如何在上傳圖像上結合使用flex和django? 我在Flex中使用了fileRefenrece,但我不知道如何使用Django中的View進行關聯。使用flex和django上傳圖像
謝謝!
我正在使用flex和django製作一個網站,其中有人登錄了一些數據,比如一個迷你實習生orkut。在服務器端,我構建了我的視圖,模型等,在客戶端,我的flex和函數和事件等的設計中,使用具有特定url和視圖的HTTPService調用django。 所以我點擊一個按鈕,例如,調用HttpService myHttpService.send(),給我的視圖提供必要的參數,並從服務器獲取返回的xml_response並將其顯示在屏幕中。 但我想允許登錄人員更改他們的個人資料照片(今天在服務器上的一個文件夾中,他們必須通過電子郵件向我發送照片,並在他們想要更改時手動進行更改= /)。 我試圖使用FileReference並調用django視圖/ url,但我不知道該怎麼做。我在互聯網上沒有發現任何信息,所以如果有人知道如何使用django和flex上傳照片/文件,不管怎麼樣,都會有很大的幫助!
感謝和抱歉我的英語不好。
爲例註銷(ID用和名稱是葡萄牙語):
我的觀點(main.py):
@xml_view
def login(request, xml_resposta, xml_erros):
params = request.POST or request.GET
nome_usuario = params.get('usuario')
senha = params.get('senha')
sessao = Sessao.cria_autenticado(nome_usuario, senha)
xml_resposta.addChild(xml.sessao_id(sessao.get_id()))
return xml_resposta
url.py:
url(r'^logout/$', 'main.logout'),
我的HTTPService上彎曲:
<mx:HTTPService id="logoutRequest" url="/logout/" resultFormat="e4x" method="POST">
<mx:request xmlns="">
<sessao{parentApplication.getIdSessao()}/sessao>
</mx:request>
</mx:HTTPService>
當我CL我可以通過LogoutRequest.send()登錄LogoutRequest.send()
含糊不清的問題:請充實。這是兩種完全不同的技術,所以請告訴我們他們是如何連接的,您的請求如何進行等等。 – jkp 2009-11-21 15:46:30