def create_user_and_user_profile(email, username, name, country, password):
 user = User.objects.create_user(username, email, password)
 reg = Registration()
 reg.register(user)
 profile = UserProfile(user=user)
 profile.name = name
 profile.country = country
 profile.save()
 return user

def create_user_and_user_profile ( email , username , name , country , password ) : user = User . objects . create_user ( username , email , password ) reg = Registration ( ) reg . register ( user ) profile = UserProfile ( user = user ) profile . name = name profile . country = country profile . save ( ) return user
create a new user .