Hm. I could use such a CustomManager, and create models via:
  XXX.objects.createObject().

But I want the init-method to run always, similar to __init__. Lets
name it "myInit()". There are a lot of ways to obtain a model instance:

  XXX.objects.filter(...).all() or XXX.objects.get(...),  and so on

Django may give me a cached instance, or load data from DB and create
one. In the latter case, myInit() should run.

Of course, I could override all the methods of the models.Manager, like
all(), filter()..., and make them call myInit() on the model.  But this
looks error-prone.

Hope this makes sense, it's late and I had too much heat ;-)
 Ruben


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

Reply via email to