Download attachments plain text encoding 'ANSI'

2020-07-16 Thread Marchi
Hi, I hope the encoding type of the download plintext file is ANSI, not UTF-8. View.py ... with open(file_path + filename, 'r', encoding='cp949') as fd: # This plain text file from inside the server is an ANSI (cp949) encoded file. response = HttpResponse(fd) response['Content-Type

[Channels] Unit tests simulating two connections

2017-05-10 Thread Luís Antonio De Marchi
First of all I'm sorry for my English, I'm supported by the translator. I'm trying to simulate 2 simultaneous connections in my unit tests, but channel name gets repeated and causes the system to "ignore" one of the connections. self._send_and_consume('websocket.connect', {"text": "", "path": "

Re: Channels, Websockets and 'Backpressure'

2017-04-27 Thread Luís Antonio De Marchi
First I need to ask for patience with my English, the translator is helping. We are creating an project with forecasts of millions of connections per second. We've never worked with websocket before, I heard that Crossbar.io was better. But I've been playing with Django Channels for some time an