def create_random_person(locale=None, minimum_name_comp_len=0):
 fake = get_faker([u'person', u'internet', u'address'], locale=locale)
 while True:
  first_name = fake.first_name()
  last_name = fake.last_name()
  name = (u'%s %s' % (first_name, last_name))
  if ((len(first_name) > minimum_name_comp_len) and (len(last_name) > minimum_name_comp_len)):
   break
 email = get_random_email(fake)
 phone = fake.phone_number()
 prefix = u''
 suffix = u''
 address = create_random_address(fake=fake, name=name, prefix=prefix, suffix=suffix, email=email, phone=phone)
 return PersonContact.objects.create(email=email, phone=phone, name=name, first_name=first_name, last_name=last_name, prefix=prefix, suffix=suffix, default_shipping_address=address, default_billing_address=address, gender=random.choice(u'mfuo'), language=fake.language)

def create_random_person ( locale = None , minimum_name_comp_len = 0 ) : fake = get_faker ( [ u'person' , u'internet' , u'address' ] , locale = locale ) while True : first_name = fake . first_name ( ) last_name = fake . last_name ( ) name = ( u'%s %s' % ( first_name , last_name ) ) if ( ( len ( first_name ) > minimum_name_comp_len ) and ( len ( last_name ) > minimum_name_comp_len ) ) : break email = get_random_email ( fake ) phone = fake . phone_number ( ) prefix = u'' suffix = u'' address = create_random_address ( fake = fake , name = name , prefix = prefix , suffix = suffix , email = email , phone = phone ) return PersonContact . objects . create ( email = email , phone = phone , name = name , first_name = first_name , last_name = last_name , prefix = prefix , suffix = suffix , default_shipping_address = address , default_billing_address = address , gender = random . choice ( u'mfuo' ) , language = fake . language )
create a random personcontact from the given locale .