Use the events framework. I'm sure there is a pre-save event. Use it
to execute one (DRY) method  and attach it to all your models.

I personally would just write a custom method (your custom
attach_user_to_model), which I'd call in all the save methods of the
models.. But I guess attaching evenents might make you feel more dry.
On the other hand, is writing rather obscure code really better than
adding the followin code to your models:
--------------
def save(self):
  attach_user_to_model(self)
---------------


--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to