Hi, Anyone knows how to combine flex and django on upload images? I used fileRefenrece in Flex but I don't know how to relat it with a View in Django.
Thanks!
[EDIT] I'm using flex and django to make a site where people have an login e some data, like an mini an intern orkut. In the server-side i build my views, models etc, in the client-side, my design in flex and functions and events etc, calling the django using HTTPService with a specific url and view. So I click on a button, for exemple, call an HttpService myHttpService.send(), give the necessary parameters to my view and get an returned xml_response from the server and show it in the screen. But I want to allow logged people to change their onw profile photos(today in a folder on the server, and they have to send me a photo by email and a change manually when they want to change =/ ). I,ve tried to use FileReference and call a django view/url, but i don't know how to do that. I don't find nothing about that on internet, so if anybody knows how to make photos/files upload using django and flex, no matters how, will helps a lot!
Thanks and sorry for my bad english.
Exemple to logout(the id's and names are in portuguese):
my view (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'),
my httpservice on flex:
<mx:HTTPService id="logoutRequest" url="/logout/" resultFormat="e4x" method="POST">
<mx:request xmlns="">
<sessao{parentApplication.getIdSessao()}/sessao>
</mx:request>
</mx:HTTPService>
When I click on the Logout button I call logoutRequest.send()