Of course you can monkey-patch the User model but the better way is to use signals pre_ or post_save
On Wed, Nov 26, 2008 at 13:54, Paddy Joy <[EMAIL PROTECTED]> wrote: > > I would like to override the save() method on the contrib.auth User > model so that I can run a routine when a user is created/modified. > > Is this possible or do I need to use a signal? I have tried overriding > the User model like this but it never seems to call my code: > > from django.contrib.auth.models import User > > # Override User model > class User(models.Model): > > def save(self): > > # Do something here > myroutine() > super(User, self).save() > > Can anyone help? > > Paddy > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

