Re: Model Updates. use save() or signals

2009-01-11 Thread Malcolm Tredinnick
On Sun, 2009-01-11 at 01:53 -0800, Matt Welch wrote: > I appreciate it. Thank you. > > I tried the examples you said and ran into one problem on the first > ( happened in the second, but fixed ). > > On Jan 11, 3:12 am, Malcolm Tredinnick > wrote: > > On Sun,

Re: Model Updates. use save() or signals

2009-01-11 Thread Matt Welch
I appreciate it. Thank you. I tried the examples you said and ran into one problem on the first ( happened in the second, but fixed ). On Jan 11, 3:12 am, Malcolm Tredinnick wrote: > On Sun, 2009-01-11 at 00:11 -0800, juice wrote: > > > > I then figured it may run

Re: Model Updates. use save() or signals

2009-01-11 Thread Malcolm Tredinnick
On Sun, 2009-01-11 at 00:11 -0800, juice wrote: > > > I then figured it may run into a loop of saving the same model, so i > > > was going to use signals but ran into the same issue that it would > > > still need to be in the save function. > > > > Are you talking about the infinite loop problem

Re: Model Updates. use save() or signals

2009-01-11 Thread juice
> > I then figured it may run into a loop of saving the same model, so i > > was going to use signals but ran into the same issue that it would > > still need to be in the save function. > > Are you talking about the infinite loop problem here? I don't understand > this paragraph. Yes sir, after

Re: Model Updates. use save() or signals

2009-01-10 Thread Malcolm Tredinnick
On Sat, 2009-01-10 at 22:26 -0800, juice wrote: > I am having trouble with setting up a pre_save signal. I want to be > able to set a location in a model instance, but only have 1 entry at > any time. I thought about just overriding the save, and adding an > update something like: > > def

Model Updates. use save() or signals

2009-01-10 Thread juice
I am having trouble with setting up a pre_save signal. I want to be able to set a location in a model instance, but only have 1 entry at any time. I thought about just overriding the save, and adding an update something like: def save(sefl): oa = Article.objects.filter(location=self.location)