Malcolm Tredinnick wrote:
> You've drifted a bit from the original topic here, though, haven't you?
Um, yes. Guilty as charged...
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to
On Wed, 2006-07-05 at 01:59 +, DavidA wrote:
>
> Malcolm Tredinnick wrote:
> > On Tue, 2006-07-04 at 02:11 +, DavidA wrote:
> > I'm not sure a created() method is going to be the right API, since this
> > event has very transitory relevance, but your example does suggest we
> > may need
Malcolm Tredinnick wrote:
> On Tue, 2006-07-04 at 02:11 +, DavidA wrote:
> I'm not sure a created() method is going to be the right API, since this
> event has very transitory relevance, but your example does suggest we
> may need something extra here at some point.
I agree that created()
On Tue, 2006-07-04 at 02:11 +, DavidA wrote:
>
> Malcolm Tredinnick wrote:
> > On Mon, 2006-07-03 at 08:54 -0700, Glenn Tenney wrote:
> > > Perhaps instead of relying on the behavor of the object's ID not
> > > existing until it's been created, that should become a method.
> > > something
On Jul 3, 2006, at 7:11 PM, DavidA wrote:
>
> In this case it would be up to the app or developer to populate the
> slug primary key field before saving. But then just testing the pk
> field wouldn't really tell me if it was saved, unless I misunderstand
> what "self.pk" is actually doing behind
Malcolm Tredinnick wrote:
> On Mon, 2006-07-03 at 08:54 -0700, Glenn Tenney wrote:
> > Perhaps instead of relying on the behavor of the object's ID not
> > existing until it's been created, that should become a method.
> > something like Model.created() returning true/flase or Model.is_created
>
On Tue, Jul 04, 2006 at 10:10:55AM +1000, Malcolm Tredinnick wrote:
> I can't see any real advantage in this. As Ivan shows, it's only a
> couple of lines of code anyway (and a more or less documented feature).
> The boolean test for "not created" at the moment is "if not self.pk:",
> which seems
On Mon, 2006-07-03 at 08:54 -0700, Glenn Tenney wrote:
> On Mon, Jul 03, 2006 at 07:09:35AM -0500, James Bennett wrote:
> > You can also differentiate between the initial save and later updates
> > by checking -- before calling the parent class' 'save' method --
> > whether the object has an ID;
Yes yes :) That was the case :)
It exactly fit my needs
Thankyou very much..
Regards - Spock - male :P
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email
On Mon, Jul 03, 2006 at 07:09:35AM -0500, James Bennett wrote:
> You can also differentiate between the initial save and later updates
> by checking -- before calling the parent class' 'save' method --
> whether the object has an ID; if it doesn't, then the object is being
> created for the first
On Mon, 2006-07-03 at 16:16 +0400, Ivan Sagalaev wrote:
> Malcolm Tredinnick wrote:
> > However, I suspect that is not what you want (since I don't use Rails, I
> > have to guess a bit from the names). We don't currently have any
> > post_update and post_create signals being emitted. This sort of
Malcolm Tredinnick wrote:
> However, I suspect that is not what you want (since I don't use Rails, I
> have to guess a bit from the names). We don't currently have any
> post_update and post_create signals being emitted. This sort of
> functionality will eventually be possible, but some reworking
And I also missed my footnoted reference:
http://www.djangoproject.com/documentation/model_api/#overriding-default-model-methods
--
"May the forces of evil become confused on the way to your house."
-- George Carlin
--~--~-~--~~~---~--~~
You received this
On 7/3/06, Spock <[EMAIL PROTECTED]> wrote:
> after_create is a hook executed when commit in database is made when
> new record is craeted:
You can accomplish the same thing by adding a custom 'save' method on
the model[1]; Django used to offer '_pre_save' and '_post_save'
methods, but anything
On Mon, 2006-07-03 at 21:08 +1000, Malcolm Tredinnick wrote:
> On Mon, 2006-07-03 at 03:55 -0700, Spock wrote:
> > Hello,
> > is there some equvalent to rails actions after_create,after_change ??
> > Or where start write such tasks ?
> >
> > I'll would like to send e-mails under some actions
On Mon, 2006-07-03 at 03:55 -0700, Spock wrote:
> Hello,
> is there some equvalent to rails actions after_create,after_change ??
> Or where start write such tasks ?
>
> I'll would like to send e-mails under some actions made in admin
> interface - some specific updates or creations..
There is a
Hello,
is there some equvalent to rails actions after_create,after_change ??
Or where start write such tasks ?
I'll would like to send e-mails under some actions made in admin
interface - some specific updates or creations..
Regars Spock,
--~--~-~--~~~---~--~~
17 matches
Mail list logo