Re: Best way to strip form data

2007-06-08 Thread Przemyslaw Wegrzyn
Malcolm Tredinnick wrote: >I can't think of a way off the top of my head to do this with generic >views. With a manually created (old)form, you could do this by >sub-classing oldforms.TextField and putting a prepare() method in the >sub-class that does the stripping, I guess, but then you are no

Re: Best way to strip form data

2007-06-08 Thread Malcolm Tredinnick
On Fri, 2007-06-08 at 11:01 +0200, Przemyslaw Wegrzyn wrote: > Malcolm Tredinnick wrote: > > >>I have some CharField's in my model, I'm using create_update generic > >>views to edit them. I need all text data to be strip()'ed before being > >>saved to database. How can this be done in the most si

Re: Best way to strip form data

2007-06-08 Thread Przemyslaw Wegrzyn
Malcolm Tredinnick wrote: >>I have some CharField's in my model, I'm using create_update generic >>views to edit them. I need all text data to be strip()'ed before being >>saved to database. How can this be done in the most simple way? >> >> > >In the model's save() method. > > Hmm, is ther

Re: Best way to strip form data

2007-06-07 Thread Malcolm Tredinnick
On Fri, 2007-06-08 at 02:45 +0200, Przemyslaw Wegrzyn wrote: > Hi! > > I have some CharField's in my model, I'm using create_update generic > views to edit them. I need all text data to be strip()'ed before being > saved to database. How can this be done in the most simple way? In the model's sa

Best way to strip form data

2007-06-07 Thread Przemyslaw Wegrzyn
Hi! I have some CharField's in my model, I'm using create_update generic views to edit them. I need all text data to be strip()'ed before being saved to database. How can this be done in the most simple way? More general question - is there any elegant way to use custom manipulators with create_