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 <[email protected]> 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 [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
-~----------~----~----~----~------~----~------~--~---