def generate_user(email):
 username = slugify(email)
 (user, _) = UserProfile.objects.get_or_create(email=email, defaults={'username': username})
 return user

def generate_user ( email ) : username = slugify ( email ) ( user , _ ) = UserProfile . objects . get_or_create ( email = email , defaults = { 'username' : username } ) return user
generate a userprofile given the email provided .