Skip to content

Bulk-add already existing users to some team via the weblate shell ? #11963

Answered by nijel
arbaes asked this question in Q&A
Discussion options

You must be logged in to vote

Yes, shell should work as well, something like this should work:

docker-compose exec --user weblate weblate weblate shell -c shell -c 'from weblate.trans.models import User, Group; users = User.objects.filter(groups__name="OldGroup"); new_group = Group.objects.get(name="NewGroup"); for user in users: user.groups.set([new_group])```

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@arbaes
Comment options

Answer selected by arbaes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants