Beispiel #1
0
def create_and_activate_referee(data):
    if 'dob' in data:
        del data['dob']
    referee = Referee.objects.create_referee(**data)
    set_key(referee)
    activate_user(referee.user)
    return referee
Beispiel #2
0
def create_and_activate_both(data):
    both = Athlete.objects.create_athlete(**data)
    set_key(both)
    activate_user(both.user)
    both.user._referee = True
    return both
Beispiel #3
0
def create_and_activate_user(data):
    user = User.objects.create_user(**data)
    set_key(user)
    activate_user(user)
    return user
Beispiel #4
0
def create_and_activate_athlete(data):
    athlete = Athlete.objects.create_athlete(**data)
    set_key(athlete)
    activate_user(athlete.user)
    return athlete