当前位置: 首页>>代码示例>>Python>>正文


Python models.SuperSearchField类代码示例

本文整理汇总了Python中crashstats.supersearch.models.SuperSearchField的典型用法代码示例。如果您正苦于以下问题:Python SuperSearchField类的具体用法?Python SuperSearchField怎么用?Python SuperSearchField使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了SuperSearchField类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: supersearch_field_update

def supersearch_field_update(request):
    field_data = _get_supersearch_field_data(request.POST)

    if isinstance(field_data, basestring):
        return http.HttpResponseBadRequest(field_data)

    api = SuperSearchField()
    api.put(field_data)

    # Refresh the cache for the fields service.
    SuperSearchFields().get(refresh_cache=True)

    return redirect(reverse('manage:supersearch_fields'))
开发者ID:jberkus,项目名称:socorro,代码行数:13,代码来源:views.py

示例2: supersearch_field_delete

def supersearch_field_delete(request):
    field_name = request.GET.get('name')

    if not field_name:
        return http.HttpResponseBadRequest('A "name" is needed')

    api = SuperSearchField()
    api.delete(name=field_name)

    # Refresh the cache for the fields service.
    SuperSearchFields().get(refresh_cache=True)

    url = reverse('manage:supersearch_fields')
    return redirect(url)
开发者ID:jberkus,项目名称:socorro,代码行数:14,代码来源:views.py

示例3: supersearch_field_update

def supersearch_field_update(request):
    field_data = _get_supersearch_field_data(request.POST)

    if isinstance(field_data, basestring):
        return http.HttpResponseBadRequest(field_data)

    api = SuperSearchField()
    api.update_field(**field_data)

    SuperSearch.clear_implementations_cache()

    log(request.user, 'supersearch_field.put', field_data)

    # Refresh the cache for the fields service.
    SuperSearchFields().get(refresh_cache=True)

    return redirect(reverse('manage:supersearch_fields'))
开发者ID:lonnen,项目名称:socorro,代码行数:17,代码来源:views.py

示例4: supersearch_field_create

def supersearch_field_create(request):
    field_data = _get_supersearch_field_data(request.POST)

    if isinstance(field_data, basestring):
        return http.HttpResponseBadRequest(field_data)

    api = SuperSearchField()
    api.post(field_data)

    # Refresh the cache for the fields service.
    SuperSearchFields().get(refresh_cache=True)

    # The API is using cache to get all fields by a specific namespace
    # for the whitelist lookup, clear that cache too.
    cache.delete('api_supersearch_fields_%s' % field_data['namespace'])

    return redirect(reverse('manage:supersearch_fields'))
开发者ID:SKY51717,项目名称:socorro,代码行数:17,代码来源:views.py

示例5: supersearch_field_delete

def supersearch_field_delete(request):
    field_name = request.GET.get('name')

    if not field_name:
        return http.HttpResponseBadRequest('A "name" is needed')

    api = SuperSearchField()
    api.delete_field(name=field_name)

    SuperSearch.clear_implementations_cache()

    log(request.user, 'supersearch_field.delete', {'name': field_name})

    # Refresh the cache for the fields service.
    SuperSearchFields().get(refresh_cache=True)

    url = reverse('manage:supersearch_fields')
    return redirect(url)
开发者ID:lonnen,项目名称:socorro,代码行数:18,代码来源:views.py


注:本文中的crashstats.supersearch.models.SuperSearchField类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。