Example #1
0
def contact_from_user(user):
    contact = Contact()
    contact.first_name = user.first_name
    contact.last_name = user.last_name
    contact.email = user.email
    contact.save()
    return contact
Example #2
0
 def setUp(self):
     contact = Contact()
     contact.first_name = "Jeffery"
     contact.last_name = "Smith"
     contact.email = "*****@*****.**"
     contact.save()
     category = Category(name='Device')
     category.save()
     for category in self.categories:
         Category(name=category).save()