Re: upload_to with username

2007-04-06 Thread Benedict Verheyen
Stephen Mizell schreef: >> That line is executed exactly once, at the time the file is imported. So >> it is not dynamic in any way. >> >> (I seem to be saying that at least every other day here. It's normal >> Python behaviour, people. Please stop hoping it were otherwise!) > > Thanks for the he

Re: upload_to with username

2007-04-03 Thread Jay Parlar
On 4/3/07, Stephen Mizell <[EMAIL PROTECTED]> wrote: > > > That line is executed exactly once, at the time the file is imported. So > > it is not dynamic in any way. > > > > (I seem to be saying that at least every other day here. It's normal > > Python behaviour, people. Please stop hoping it wer

Re: upload_to with username

2007-04-03 Thread Stephen Mizell
> That line is executed exactly once, at the time the file is imported. So > it is not dynamic in any way. > > (I seem to be saying that at least every other day here. It's normal > Python behaviour, people. Please stop hoping it were otherwise!) Thanks for the help. I didn't call it dynamic, th

Re: upload_to with username

2007-04-02 Thread Jay Parlar
On 4/3/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > I remember having some concerns about your approach a while back, but > apparently they weren't significant enough for me to attach a comment to > the ticket. A bit careless on my part. :-( > > I'll try to reconstruct my thinking in the ba

Re: upload_to with username

2007-04-02 Thread Robert Coup
Stephen Mizell wrote: > I'm wanting to have upload_to for my file so it uploads to a different > directory for each user. This works when I use it with a newform, but > when I try to use the Django admin, it puts None as the username (I > want to base it on whatever username I select for "user").

Re: upload_to with username

2007-04-02 Thread Malcolm Tredinnick
Hey Jay, On Mon, 2007-04-02 at 23:48 -0400, Jay Parlar wrote: > On 4/2/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > > At the moment, there is no easy way to change the base directory for > > file uploads. You can however, change the filename to include > > sub-directories, I believe (so ch

Re: upload_to with username

2007-04-02 Thread Jay Parlar
On 4/2/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > At the moment, there is no easy way to change the base directory for > file uploads. You can however, change the filename to include > sub-directories, I believe (so change foo.blah to upload/dir/foo.blah). > If you want to try and change

Re: upload_to with username

2007-04-02 Thread Malcolm Tredinnick
On Mon, 2007-04-02 at 20:04 +, Stephen Mizell wrote: > I'm wanting to have upload_to for my file so it uploads to a different > directory for each user. This works when I use it with a newform, but > when I try to use the Django admin, it puts None as the username (I > want to base it on what

upload_to with username

2007-04-02 Thread Stephen Mizell
I'm wanting to have upload_to for my file so it uploads to a different directory for each user. This works when I use it with a newform, but when I try to use the Django admin, it puts None as the username (I want to base it on whatever username I select for "user"). I'm using some middleware fo