Re: Streaming uploads to temp files

2006-03-10 Thread Ivan Sagalaev
Ivan Sagalaev wrote: >Then it's not that much irrelevant :-). I'll make a setting for chosing >type of a storage but not for chunk size. > > I've submitted a patch. It even looks faster than email.Message even without disk storage. Can anyone please test it under magic-removal? --~--~---

Re: Why settings.py option name should be capital letters

2006-03-10 Thread limodou
On 3/11/06, Adrian Holovaty <[EMAIL PROTECTED]> wrote: > > On 3/10/06, limodou <[EMAIL PROTECTED]> wrote: > > I want to put some variables in settings.py, and I used lowercase > > variable name, and I could not access the attribute from settings. And > > I checked the code, found that the option n

Re: Why settings.py option name should be capital letters

2006-03-10 Thread Adrian Holovaty
On 3/10/06, limodou <[EMAIL PROTECTED]> wrote: > I want to put some variables in settings.py, and I used lowercase > variable name, and I could not access the attribute from settings. And > I checked the code, found that the option name should be capital > letters, so I have this question: > > Why

Re: Forum in Django

2006-03-10 Thread pbx
> Does exist any forum application developed in Django already? Mike Josephson was working on something called Exhedra, but it's been a few months since the last signs of life. http://www.exhedra.org/weblog/ pb --~--~-~--~~~---~--~~ You received this message

Why settings.py option name should be capital letters

2006-03-10 Thread limodou
I want to put some variables in settings.py, and I used lowercase variable name, and I could not access the attribute from settings. And I checked the code, found that the option name should be capital letters, so I have this question: Why settings.py option name should be capital letters Can an

Re: strange behaviour in mysql / postgresql session_data

2006-03-10 Thread Simon de Haan
Hello, I probably posted this email to wrong list. But just for the sake of other people running into this problem & googling for a solution I'll post it anyway. The fact that I got back an array had to do with MySQL's collation settings, I had it set to 'utf8_bin' when I got the errors, chang

Re: Streaming uploads to temp files

2006-03-10 Thread Ivan Sagalaev
Ivan Sagalaev wrote: >Looks like I was wrong. > And again :-( > It appears that cgi.FieldStorage stores content >in temp files only when uploaded parts have Content-length set. But >browser doesn't set it and FieldStorage reads data with readline() and >stores it in memory anyway. > > It do

Re: Streaming uploads to temp files

2006-03-10 Thread Ivan Sagalaev
Ivan Sagalaev wrote: >With streaming to temp files it takes about a second. > Looks like I was wrong. It appears that cgi.FieldStorage stores content in temp files only when uploaded parts have Content-length set. But browser doesn't set it and FieldStorage reads data with readline() and store

Re: Streaming uploads to temp files

2006-03-10 Thread Ivan Sagalaev
Malcolm Tredinnick wrote: >Some number of megabytes per chunk (10, maybe). You are going to execute >a lot of loops and consequent data copying if you are doing multiple >passes per megabyte of data. > > This is the whole point -- to make it in small chunks (but not very small) to conserve mem

Re: Streaming uploads to temp files

2006-03-10 Thread Malcolm Tredinnick
Hi Ivan, Some initial thoughts... On Fri, 2006-03-10 at 11:43 +0300, Ivan Sagalaev wrote: > There is a ticket for making Django not to eat entire file upload in > memory http://code.djangoproject.com/ticket/1484 > > I have it basically working using cgi.FieldStorage which stores POSTed > file

Streaming uploads to temp files

2006-03-10 Thread Ivan Sagalaev
There is a ticket for making Django not to eat entire file upload in memory http://code.djangoproject.com/ticket/1484 I have it basically working using cgi.FieldStorage which stores POSTed files in temp files. request.FILES items now are classes inherited from dict that have file['file'] retur