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
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
2 matches
Mail list logo