1👍
It sounds like you’re trying to do a/b split testing? In which case there are a few django apps out there to help you do that:
django-lean seems to be quite heavyweight, but has lots of useful tools in it.
django-experiments does what you’re after and was updated fairly recently.
At the very least you could browse around their source and see how they divide up the users.
👤ptr
Source:stackexchange.com