User signals: models.py ---------------------- def do_something(sender, instance=None, **kwargs): """Does something instance is the user instance. """ if instance is not None: # Do Something post_save.connect(do_something, sender=User) # User is the user model.
On 14 Okt., 13:17, Zilva <zilva....@gmail.com> wrote: > Hi, > > seeking a way how user ID automatically add in to the integer field, > Django model. > Would anyone know any simple solution? --~--~---------~--~----~------------~-------~--~----~ 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 django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---