Hi!
I am having a challenge . My aim is to be able to assign some group permissions when the group is created. In admin.py I have a custom GroupAdmin class on which I have the function save customized but the challenge is everything else get saved and reflected on admin page including user permissions(if i set permissions to the user direct) but the group permissions seems to be saved but when I go to admin page they are not assigned.
Can you share you experience !
permits = Permission.objects.filter(content_type__app_label='myapp')
####Saved but not updated on Admin page
obj.permissions=permits
obj.save()
#####Works Perfect and changes seen on admin page
user = User.objects.create_user('username12', '', 'password')
user.groups.add(obj)
user.user_permissions=perms
user.is_staff=True
user.save()
obj is an object of Group.
Regards