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

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

src/s/i/sikteeri-HEAD/membership/views.py   sikteeri(Download)
                login_alias = Alias(owner=membership, name=f['unix_login'], account=True)
                login_alias.save()
                unix_account_service = Service(servicetype=ServiceType.objects.get(servicetype='UNIX account'),
                                               alias=login_alias, owner=membership, data=f['unix_login'])
                unix_account_service.save()
                    forward_alias = Alias(owner=membership, name=f['email_forward'])
                    forward_alias.save()
                    forward_alias_service = Service(servicetype=ServiceType.objects.get(servicetype='Email alias'),
                                                    alias=forward_alias, owner=membership, data=f['unix_login'])
                    forward_alias_service.save()
                    services.append(forward_alias_service)
 
                if f['mysql_database'] == True:
                    mysql_service = Service(servicetype=ServiceType.objects.get(servicetype='MySQL database'),
                    services.append(mysql_service)
                if f['postgresql_database'] == True:
                    postgresql_service = Service(servicetype=ServiceType.objects.get(servicetype='PostgreSQL database'),
                                                 alias=login_alias, owner=membership, data=f['unix_login'])
                    postgresql_service.save()
                    services.append(postgresql_service)
                if f['login_vhost'] == True:
                    login_vhost_service = Service(servicetype=ServiceType.objects.get(servicetype='WWW vhost'),

src/s/i/sikteeri-HEAD/sikteeri/generate_test_data.py   sikteeri(Download)
 
    # Services
    forward_alias_service = Service(servicetype=ServiceType.objects.get(servicetype='Email alias'),
                                    alias=forward_alias, owner=membership, data=forward_alias.name)
    forward_alias_service.save()
 
    unix_account_service = Service(servicetype=ServiceType.objects.get(servicetype='UNIX account'),
 
    if random() < 0.6:
        mysql_service = Service(servicetype=ServiceType.objects.get(servicetype='MySQL database'),
                                alias=login_alias, owner=membership, data=login_alias.name.replace('-', '_'))
        mysql_service.save()
    if random() < 0.6:
        postgresql_service = Service(servicetype=ServiceType.objects.get(servicetype='PostgreSQL database'),