Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(5)  |  Call(5)  |  Derive(0)  |  Import(0)

src/b/o/boar-HEAD/boar/facebook_connect/middleware.py   boar(Download)
		            # Logged into facebook, but no user exists on the site
		            user_profile = UserProfile.objects.create_from_name(
		                info['name']
		            )
		            user_profile.user.email = info['email']

src/b/o/boar-HEAD/boar/accounts/tests.py   boar(Download)
    def test_create_from_name(self):
        u = UserProfile.objects.create_from_name('Joe Shmo')
        self.assertEqual(u.user.first_name, 'Joe')
        self.assertEqual(u.user.last_name, 'Shmo')
        self.assertEqual(u.user.username, 'joe.shmo')
 
        u = UserProfile.objects.create_from_name('Joe Shmo')
        self.assertEqual(u.user.username, 'joe.shmo.2')
 
        u = UserProfile.objects.create_from_name('Joe S!h-m%(&o Fo')
        self.assertEqual(u.user.username, 'joe.shmo.fo')
 
        u = UserProfile.objects.create_from_name('Joe')
        self.assertEqual(u.user.first_name, 'Joe')
        self.assertEqual(u.user.last_name, '')