Re: Use of the ORM in long running (non web) daemon

2009-08-06 Thread wam
On Aug 6, 3:20 am, Russell Keith-Magee wrote: > What you have described shouldn't require any particularly special > handling. I have code in production that does exactly the same thing - > a daemonized process that responds to requests on a port, does some > processing,

Use of the ORM in long running (non web) daemon

2009-08-05 Thread wam
I am using the Django ORM to build and manipulate models from outside of a web context and within a long running daemonized application. I'm using the django ORM talking to a postgresql db for this processing since the results of this external processing are then used by a Django based web

Re: Callable hooks for generic views after validation with no errors?

2006-10-05 Thread wam
James Bennett wrote: > For getting access to the object, I believe that when the 'post_save' > dispatcher signal is sent after saving, one of the included attributes > of the signal is the object itself. > Thanks for the updated (and very much expanded) documentation on django signals. I see how

Re: Callable hooks for generic views after validation with no errors?

2006-10-04 Thread wam
James Bennett wrote: > This is probably the way to do it; adding special-case hooks to the > generic views doesn't sound like a good solution to me. Well, callables which can be sent into generic views and are executed just prior to handing off to the template in order to populate additional

Callable hooks for generic views after validation with no errors?

2006-10-04 Thread wam
I make extensive use of generic views in one of my apps. Now that the app is nearly finished, I'm being asked to do change tracking/audit trail on the objects managed in the generic views. Recognizing that I could just create and save django.contrib.admin.models.LogEntry() objects and possibly

Re: A little help with a filter

2006-06-01 Thread wam
Chris Moffitt wrote: > If I try this: >item1.sub_item_set.filter(options__name__exact="Small").filter(options__name__exact="Blue") > I get an empty list. > > I've tried this using Q objects and some other things but I can't get it > to work. Anyone have ideas of what I'm doing wrong? > Try

Re: Wiki or Blogs done with django

2006-05-30 Thread wam
I've recently been updating my site to be entirely django powered. As others have done, I applied the 'Fixing the Magic' document to Ross Poulton's blog tutorial and have applied some of my own tweaks as well. So far I am fairly happy with the result. Source code is at

Admin issue (bug?) when handling subclass models.

2006-05-08 Thread wam
I am porting an app to the latest SVN trunk of Django and am running into a problem with the admin interface not currectly processing objects which are subclasses of a more generic model. I've written up a small testcase model that demonstrates this problem: from django.db import models class

Re: Recursive(?) ManyToMany model

2006-03-27 Thread wam
Malcolm Tredinnick wrote: > Hi William, > I may be missing something, but it sounds like you want a one-to-many > (a.k.a. ForeignKey) relationship here. The 'one' side is the "self" > document in each case with links to 'many' other documents. I don't > believe a ManyToMany relationship is

Recursive(?) ManyToMany model

2006-03-26 Thread wam
I have a model where I will have a pool of documents that will have several references to various other documents within the pool. For example, I'm trying to do something similar to the following: class Doc(meta.Model): title = meta.CharField(maxlength=50) contents = meta.TextField()