On Jul 14, 6:37 pm, "Miguel Filho" <[EMAIL PROTECTED]> wrote:
> On 7/14/07, Steven Hilton <[EMAIL PROTECTED]> wrote:
>
>
>
> > I'm working on a web app where if a particular conditions is met in
> > particular object, a number of objects in another class/table need to
> > be altered. Basically a trigger, but I'm trying to keep all my logic
> > in the app for the time being. I'm wondering if there's a way to do
> > this with the Django DB API w/o falling back to raw sql.
>
> I did a quick search around, I think this is what you're looking for:
>
> http://www.mercurytide.co.uk/whitepapers/django-signals/
>
> I read it, and sounds very cool!
>
> I don't know why there is no mention about it on the main documentation page.
>
> Miguel

Thanks, this may help me improve the code, but when the signal gets
executed, I still need to know if Django supports updating multiple db
rows in a single operation. So far as I can tell, with or without the
dispatcher code, I will still need to select the 'bar' objects with a
filter, update the data in each object, and save them individually --
if I use the Django object model and db api.

But that may require retrieving, modifying and saving several hundred
objects.  I'm trying to optmize around that.

I'm now trying to use custom sql, but the code is not committing. I've
done some searching on this group, and it's got something to do with
transactions.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to