Re: remove user from a specific group in django

2022-08-17 Thread Ryan Nowakowski
usuario isn't a username, it's a QuerySet so I don't think: User.objects.get(username=usuario) ... will work. Please post the specific error you're getting including any traceback. On August 16, 2022 3:30:46 PM CDT, "José Ángel Encinas" wrote: >hi guys, im trying to remove user from a specifi

remove user from a specific group in django

2022-08-16 Thread José Ángel Encinas
hi guys, im trying to remove user from a specific group using a function in django but can to do it, can help me someone? this is the function def accesstosystem(request): usuario = User.objects.filter(groups__name='revisión') user = User.objects.get(username=usuario) group = Group.ob