title: Adding user to group on save in Django 1.9
body: <p>Hello, I'm using Django 1.9. Trying to add a user to group on creation or save.
  Using either user.groups or groups.user_set.add don't work, mix and match with pre- and post-save below.</p>
  
  <p>These answers aren't working for me, and so this isn't a dupe:
  <a href="https://stackoverflow.com/questions/25540082/adding-user-to-group-on-creation-in-django">Adding user to group on creation in Django</a><br>
  <a href="https://stackoverflow.com/questions/6288661/adding-a-user-to-a-group-in-django">Adding a user to a group in django</a><br>
  <a href="https://stackoverflow.com/questions/29803608/add-users-to-groups-in-django">Add users to groups in Django</a></p>
  
  <p>I have tried both methods in both pre- and post-save handlers.</p>
  
  <pre><code>@receiver(pre_save, sender=User)
  def user_presave_handler(sender, instance, **kwargs):
      if instance.is_staff and not instance.is_superuser:
          # Grant all permissions
          try:
              instance.groups.add(Group.objects.get(name='staff_user'))
          except Group.DoesNotExist:
              pass
  
  @receiver(post_save, sender=User)
  def user_postsave_handler(sender, instance, **kwargs):
      if instance.is_staff and not instance.is_superuser:
          try:
              g = Group.objects.get(name='staff_user')
          except Group.DoesNotExist:
              pass
          else:
              g.user_set.add(instance)
              g.save()
  </code></pre>
  
  <p>You can mix and match which method is used where, I have tried it. I don't use more than one method in testing. After hitting the save button on user admin page, the user is not shown as in the group.</p>
  
  <p>I double-checked that the handlers are getting called, user logic is correct, etc.</p>
  
  <p>Is there something I'm doing wrong, or something that has changed in 1.9 to break the old methods?</p>
  
  <p>Thanks!</p>
  
  <p>Edit:
  For those asking, the group is created like this:</p>
  
  <pre><code>group, __ = Group.objects.get_or_create(name='staff_user')
  
  permissions = Permission.objects.all()
  for p in permissions:
      group.permissions.add(p)
  group.save()
  </code></pre>
  
  <p>I have debugged it and the group definitely exists, though maybe I made it wrong and so it won't be applied?</p>