Did I find the right examples for you? yes no

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

src/i/n/indextank-service-HEAD/storefront/views.py   indextank-service(Download)
        index.language_code = 'en'
        try:
                index.save()
        except IntegrityError, ie:
                print('integrityError in api_register_index.', ie)
                return HttpResponse('{"status":"ERROR", "message":"You already have and Index with that name or code."}')
 
        index.base_port = STARTING_BASE_PORT + 10 * index.id
        index.code = get_index_code(index.id)
        index.save()