taskapp/events/user.py
changeset 30 055dc4c1db57
parent 12 a93eebabfeb1
child 31 988d4994578f
equal deleted inserted replaced
29:8baf12083a1e 30:055dc4c1db57
    32     properties = {'dob':dob, 'gender':gender}
    32     properties = {'dob':dob, 'gender':gender}
    33     user_profile = Profile(user=user)
    33     user_profile = Profile(user=user)
    34     updateProfile(user_profile, properties)
    34     updateProfile(user_profile, properties)
    35     return user
    35     return user
    36     
    36     
    37 def createSuUser(username,email,password,**properties):
    37 def createSuUser(username,email,password,dob,gender):
    38     """ create user using createUser method and set the is_superuser flag """
    38     """ create user using createUser method and set the is_superuser flag """
    39     
    39     
    40     su_user = createUser(username,email,password,**properties)
    40     su_user = createUser(username,email,password,dob,gender)
    41     su_user.is_staff = True
    41     su_user.is_staff = True
    42     su_user.is_superuser = True
    42     su_user.is_superuser = True
    43     su_user.save()
    43     su_user.save()