Did I find the right examples for you? yes no

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

src/d/j/djep-HEAD/pyconde/accounts/forms.py   djep(Download)
        """
        Profile.objects.create(
            user=new_user,
            avatar=self.cleaned_data['avatar'],
            short_info=self.cleaned_data['short_info'],

src/m/o/moztrap-HEAD/moztrap/model/environments/fixture_gen.py   moztrap(Download)
def sample_environments():
    admin = User.objects.get(username="admin")
 
    webenvs = Profile.objects.create(
        name="Website Testing Environments", user=admin)
    browserenvs = Profile.objects.create(
        name="Browser Testing Environments", user=admin)

src/p/o/popcorn_maker-HEAD/popcorn_gallery/users/views.py   popcorn_maker(Download)
        profile = request.user.get_profile()
    except Profile.DoesNotExist:
        profile = Profile.objects.create(user=request.user)
    ProfileFormClass = ProfileForm
    mode = 'edit'

src/p/i/pinax-project-social-HEAD/project_name/profiles/receivers.py   pinax-project-social(Download)
def user_post_save(sender, instance, created, **kwargs):
    if created:
        Profile.objects.create(user=instance)
 

src/d/j/django-filter-0.7/tests/test_filtering.py   django-filter(Download)
        a4 = Account.objects.create(
            name='account4', in_good_standing=False, friendly=True)
        Profile.objects.create(account=a1, likes_coffee=True, likes_tea=False)
        Profile.objects.create(account=a2, likes_coffee=False, likes_tea=True)
        Profile.objects.create(account=a3, likes_coffee=True, likes_tea=True)
        Profile.objects.create(account=a4, likes_coffee=False, likes_tea=False)

src/d/j/django-filter-HEAD/tests/test_filtering.py   django-filter(Download)
        a4 = Account.objects.create(
            name='account4', in_good_standing=False, friendly=True)
        Profile.objects.create(account=a1, likes_coffee=True, likes_tea=False)
        Profile.objects.create(account=a2, likes_coffee=False, likes_tea=True)
        Profile.objects.create(account=a3, likes_coffee=True, likes_tea=True)
        Profile.objects.create(account=a4, likes_coffee=False, likes_tea=False)

src/d/j/django-pyodbc-HEAD/tests/django16/update_only_fields/tests.py   django-pyodbc(Download)
    def test_update_fields_inheritance_defer(self):
        profile_boss = Profile.objects.create(name='Boss', salary=3000)
        e1 = Employee.objects.create(name='Sara', gender='F',
            employee_num=1, profile=profile_boss)
        e1 = Employee.objects.only('name').get(pk=e1.pk)
    def test_update_fields_fk_defer(self):
        profile_boss = Profile.objects.create(name='Boss', salary=3000)
        profile_receptionist = Profile.objects.create(name='Receptionist', salary=1000)
        e1 = Employee.objects.create(name='Sara', gender='F',
            employee_num=1, profile=profile_boss)
    def test_select_related_only_interaction(self):
        profile_boss = Profile.objects.create(name='Boss', salary=3000)
        e1 = Employee.objects.create(name='Sara', gender='F',
            employee_num=1, profile=profile_boss)
        e1 = Employee.objects.only('profile__salary').select_related('profile').get(pk=e1.pk)
    def test_update_fields_m2m(self):
        profile_boss = Profile.objects.create(name='Boss', salary=3000)
        e1 = Employee.objects.create(name='Sara', gender='F',
            employee_num=1, profile=profile_boss)
 

src/d/j/django-pyodbc-HEAD/tests/django15/update_only_fields/tests.py   django-pyodbc(Download)
    def test_update_fields_inheritance_defer(self):
        profile_boss = Profile.objects.create(name='Boss', salary=3000)
        e1 = Employee.objects.create(name='Sara', gender='F',
            employee_num=1, profile=profile_boss)
        e1 = Employee.objects.only('name').get(pk=e1.pk)
    def test_update_fields_fk_defer(self):
        profile_boss = Profile.objects.create(name='Boss', salary=3000)
        profile_receptionist = Profile.objects.create(name='Receptionist', salary=1000)
        e1 = Employee.objects.create(name='Sara', gender='F',
            employee_num=1, profile=profile_boss)
    def test_select_related_only_interaction(self):
        profile_boss = Profile.objects.create(name='Boss', salary=3000)
        e1 = Employee.objects.create(name='Sara', gender='F',
            employee_num=1, profile=profile_boss)
        e1 = Employee.objects.only('profile__salary').select_related('profile').get(pk=e1.pk)
    def test_update_fields_m2m(self):
        profile_boss = Profile.objects.create(name='Boss', salary=3000)
        e1 = Employee.objects.create(name='Sara', gender='F',
            employee_num=1, profile=profile_boss)
 

src/a/p/appscale-HEAD/AppServer/lib/django-1.5/tests/modeltests/update_only_fields/tests.py   appscale(Download)
    def test_update_fields_inheritance_defer(self):
        profile_boss = Profile.objects.create(name='Boss', salary=3000)
        e1 = Employee.objects.create(name='Sara', gender='F',
            employee_num=1, profile=profile_boss)
        e1 = Employee.objects.only('name').get(pk=e1.pk)
    def test_update_fields_fk_defer(self):
        profile_boss = Profile.objects.create(name='Boss', salary=3000)
        profile_receptionist = Profile.objects.create(name='Receptionist', salary=1000)
        e1 = Employee.objects.create(name='Sara', gender='F',
            employee_num=1, profile=profile_boss)
    def test_select_related_only_interaction(self):
        profile_boss = Profile.objects.create(name='Boss', salary=3000)
        e1 = Employee.objects.create(name='Sara', gender='F',
            employee_num=1, profile=profile_boss)
        e1 = Employee.objects.only('profile__salary').select_related('profile').get(pk=e1.pk)
    def test_update_fields_m2m(self):
        profile_boss = Profile.objects.create(name='Boss', salary=3000)
        e1 = Employee.objects.create(name='Sara', gender='F',
            employee_num=1, profile=profile_boss)
 

src/d/j/django-forumbr-0.4.0.1/forum/tests.py   django-forumbr(Download)
def new_profile(user, nickname=None, gender=None):
    from .models import Profile, GENDER_MALE
 
    return Profile.objects.create(
        user=user,
    def test_access_without_user_account(self):
        from .models import Profile
 
        user = User.objects.create_user('john', 'email@email.com', 'doe')
        Profile.objects.create(user=user, nickname='blah')

  1 | 2 | 3  Next