Re: proposal: deprecate "date" and "time" template filters and create "formattimestamp"

2007-10-28 Thread James Bennett
On 10/28/07, Amit Upadhyay <[EMAIL PROTECTED]> wrote: > [Rant] I'm inclined to forward this upstream to Python, which steadfastly maintains separate "datetime" and "time" modules. -- "Bureaucrat Conrad, you are technically correct -- the best kind of correct." --~--~-~--~~

Re: FileField question

2007-10-28 Thread Marty Alchin
On 10/28/07, Yuri Baburov <[EMAIL PROTECTED]> wrote: > How about introducing new argument, and allowing to use only one or another? > > so, variant 1 (backward-compatible one): > my_file = models.FileField(upload_to="%Y/%m/%d") > > variant 2 (works only in new revisions): > my_file = models.FileFi

Re: FileField question

2007-10-28 Thread Marty Alchin
On 10/28/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > Aren't you still left with one option for upload_to and one for > specifying the full details of the filename in this version? Two options > is at least twice as many as we need.We have to live with (which means > maintain, document and

Re: FileField question

2007-10-28 Thread Yuri Baburov
How about introducing new argument, and allowing to use only one or another? so, variant 1 (backward-compatible one): my_file = models.FileField(upload_to="%Y/%m/%d") variant 2 (works only in new revisions): my_file = models.FileField(upload_to=get_file_path) def get_file_path(obj): return

Re: FileField question

2007-10-28 Thread Malcolm Tredinnick
On Sun, 2007-10-28 at 20:21 -0500, Marty Alchin wrote: > On 10/28/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > > I haven't been concentrating too much, since I'm pretty overloaded with > > other things (both Django and real life) at the moment. But my general > > impression is in line with

Re: FileField question

2007-10-28 Thread Marty Alchin
On 10/28/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > I haven't been concentrating too much, since I'm pretty overloaded with > other things (both Django and real life) at the moment. But my general > impression is in line with yours, Marty: having two attributes and a > complex system of "

proposal: deprecate "date" and "time" template filters and create "formattimestamp"

2007-10-28 Thread Amit Upadhyay
[Rant] This is the second time I am hitting this issue. I have some models with DateTime field, and I wanted to show it in a given format, I googled "django template" and hit the first link. There I see "date" template filter, and am thinking cool, this is what I need. But suddenly I realize there

Re: Question about queryset's iterator behaviour

2007-10-28 Thread Malcolm Tredinnick
On Sun, 2007-10-28 at 15:58 -0700, Stavros wrote: > No, I don't want to use a paginator. I don't even display the results, > I just process them. I was weighing in in favor of turning iterator() > into an actual iterator that fetches a few results at a time, as per > the discussion at hand. First

Re: Stripping spaces and linebreaks from blocktrans?

2007-10-28 Thread Malcolm Tredinnick
On Sun, 2007-10-28 at 21:46 +, Dmitri Fedortchenko wrote: > That's a great idea! I'll see if I can squeeze out a patch for this, > since I feel that I want to be able to indent blocktrans without > having the extra spaces in the po files (I realize one can remove the > extra spaces manually in

Re: FileField question

2007-10-28 Thread Malcolm Tredinnick
On Sun, 2007-10-28 at 18:31 -0500, Marty Alchin wrote: > On 10/28/07, Justin Driscoll <[EMAIL PROTECTED]> wrote: > > I may be missing something but lets say when you pass a string to > > "upload_to" it functions basically as it does now, however, if you pass a > > callable it takes the return valu

Re: FileField question

2007-10-28 Thread Marty Alchin
On 10/28/07, Justin Driscoll <[EMAIL PROTECTED]> wrote: > I may be missing something but lets say when you pass a string to > "upload_to" it functions basically as it does now, however, if you pass a > callable it takes the return value (the full relative path of the file, > including the filename

Re: Question about queryset's iterator behaviour

2007-10-28 Thread Stavros
No, I don't want to use a paginator. I don't even display the results, I just process them. I was weighing in in favor of turning iterator() into an actual iterator that fetches a few results at a time, as per the discussion at hand. --~--~-~--~~~---~--~~ You rece

Re: Question about queryset's iterator behaviour

2007-10-28 Thread Jacob Kaplan-Moss
On 10/28/07, Stavros <[EMAIL PROTECTED]> wrote: > I'm developing an app that takes about 3m rows from the DB [...] You probably want to use a paginator: http://www.djangoproject.com/documentation/models/pagination/ In the future, please direct questions of this nature to django-users; django-dev

Re: Question about queryset's iterator behaviour

2007-10-28 Thread Stavros
I'm developing an app that takes about 3m rows from the DB, and currently everything is loaded in memory. This is unacceptable, since the script rapidly uses up all the memory available in the machine and stops responding. It would be good if django could return an actual iterator, so we could wor

Re: Stripping spaces and linebreaks from blocktrans?

2007-10-28 Thread Dmitri Fedortchenko
That's a great idea! I'll see if I can squeeze out a patch for this, since I feel that I want to be able to indent blocktrans without having the extra spaces in the po files (I realize one can remove the extra spaces manually in the po files, but I like consistent autogeneration hehe). In other w

Re: FileField question

2007-10-28 Thread Justin Driscoll
I may be missing something but lets say when you pass a string to "upload_to" it functions basically as it does now, however, if you pass a callable it takes the return value (the full relative path of the file, including the filename, in relation to MEDIA_ROOT) and splits it into the path and file

MEET UR SCHOOL & COLLEGE FRIENDS. UR FRIENDS ARE WAITING FOR U..

2007-10-28 Thread sai.sri206
IF you want to meet your old school & college mate's of your life there is a chance, just enter school or college details in the below site http://www.batchmates.com/MGMhome.asp?refid=1385582&reflink=30264 PLEASE REGISTER IN THIS SITE. IF U LIKE THEN FORWARD THIS MAIL TO U R FRIENDS... --

Re: FileField question

2007-10-28 Thread Marty Alchin
On 10/27/07, Justin Driscoll <[EMAIL PROTECTED]> wrote: > Any reason not to have upload_to accept a string OR a callable and function > accordingly? Hrm, to be honest, I hadn't really considered that. To me, upload_to makes the most sense as a directory path only, rather than including a filename