Did I find the right examples for you? yes no

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

src/i/n/indextank-service-HEAD/storefront/views.py   indextank-service(Download)
def insights(request, index_code=None):
    index = Index.objects.get(code=index_code)
    insights = {}
    insights_update = {}
    for i in index.insights.all():
def manage_index(request, index_code=None):
    account = request.user.get_profile().account
 
    index = Index.objects.get(code=index_code)
 
    if index:
        if index.account == account:
            if request.method == 'GET':
                index = Index.objects.get(code=index_code)
def manage_inspect(request, index_code=None):
    account = request.user.get_profile().account
 
    index = Index.objects.get(code=index_code)
 
    if request.method == 'GET':
        index_code = request.GET['index_code']
        index = Index.objects.get(code=index_code)
 
        functions = get_functions(index)

src/i/n/indextank-service-HEAD/backoffice/views.py   indextank-service(Download)
def index_history(request, worker_id=None, index_id=None):
    index = Index.objects.get(id=index_id)
    worker = Worker.objects.get(id=worker_id)
 
    index_infos = WorkerIndexInfo.objects.filter(worker__id=worker_id, deploy__index__id=index_id)
    elif level == 'index':
        id = request.GET.get('id')
        index = Index.objects.get(pk=id);
        data = {
            'Index': index_dict(index),
        updated = Index.objects.filter(id=id).update(configuration=c)
        if updated:
            return JsonResponse(index_dict(Index.objects.get(id=id)))
        else:
            return HttpResponse('index not found', status=409)

src/h/u/humfrey-0.3.9/humfrey/elasticsearch/tasks.py   humfrey(Download)
def update_index(index):
    if isinstance(index, basestring):
        index = Index.objects.get(slug=index)
    index.status = 'active'
    index.save()

src/h/u/humfrey-HEAD/humfrey/elasticsearch/tasks.py   humfrey(Download)
def update_index(index):
    if isinstance(index, basestring):
        index = Index.objects.get(slug=index)
    index.status = 'active'
    index.last_started = datetime.datetime.now()