class GeneralInformation(Page): form_model = 'player' @staticmethod def get_form_fields(player: Player): import random import itertools form_fields = [ 'name', 'lastname', 'age', 'dep_born', 'dep_current', 'city_current', 'hood' ] random.shuffle(form_fields) return form_fields class GeneralInformation(Page): form_model = 'player' @staticmethod def get_form_fields(player: Player): import random x = [ 'name', 'lastname', 'age', 'dep_born', 'dep_current', 'city_current', 'hood' ] form_fields = [random.choice(x)] return form_fields *--------------------------------------* class GeneralInformation(Page): form_model = 'player' @staticmethod def get_form_fields(player: Player): import random X = [1,2] aux = random.choice(X) if aux == 1: print("es uno") form_fields = ['name','lastname'] if aux == 2: print("es dos") form_fields = ['dep_born','dep_current'] return form_fields *---------------------------------------------* class GeneralInformation(Page): form_model = 'player' form_fields = [ 'name', 'lastname', 'age', 'dep_born', 'dep_current', 'city_current', 'hood' ] @staticmethod def vars_for_template(player: Player): import random X = [1,2,3,4] rand = random.choice(X) return dict(treatment=rand) #---------------------------------------------- page_sequence = [GeneralInformation, Education, Labor, EthnicAffiliation, Durables, WarmP1,WarmP2,WarmP3, WarmC1,WarmC2,WarmC3,WarmC4, WarmO1,WarmO2,WarmO3,WarmO4,WarmO5,WarmO6, Context, Conf1,Conf2,Conf3,Conf4, Idea, Often1,Often2, SocMedia, Results]