本文整理汇总了Python中mkt.webapps.models.Webapp.get_indexer方法的典型用法代码示例。如果您正苦于以下问题:Python Webapp.get_indexer方法的具体用法?Python Webapp.get_indexer怎么用?Python Webapp.get_indexer使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类mkt.webapps.models.Webapp
的用法示例。
在下文中一共展示了Webapp.get_indexer方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: tearDown
# 需要导入模块: from mkt.webapps.models import Webapp [as 别名]
# 或者: from mkt.webapps.models.Webapp import get_indexer [as 别名]
def tearDown(self):
# Taken from MultiSearchView test.
for w in Webapp.objects.all():
w.delete()
for w in Website.objects.all():
w.delete()
super(TestDailyGamesView, self).tearDown()
Webapp.get_indexer().unindexer(_all=True)
Website.get_indexer().unindexer(_all=True)
self.refresh(('webapp', 'website'))
示例2: tearDown
# 需要导入模块: from mkt.webapps.models import Webapp [as 别名]
# 或者: from mkt.webapps.models.Webapp import get_indexer [as 别名]
def tearDown(self):
for o in Webapp.objects.all():
o.delete()
for o in Extension.objects.all():
o.delete()
super(TestMultiSearchView, self).tearDown()
# Make sure to delete and unindex *all* things. Normally we wouldn't
# care about stray deleted content staying in the index, but they can
# have an impact on relevancy scoring so we need to make sure. This
# needs to happen after super() has been called since it'll process the
# indexing tasks that should happen post_request, and we need to wait
# for ES to have done everything before continuing.
Webapp.get_indexer().unindexer(_all=True)
Extension.get_indexer().unindexer(_all=True)
HomescreenIndexer.unindexer(_all=True)
self.refresh(('webapp', 'extension', 'homescreen'))
示例3: setUp
# 需要导入模块: from mkt.webapps.models import Webapp [as 别名]
# 或者: from mkt.webapps.models.Webapp import get_indexer [as 别名]
def setUp(self):
Webapp.get_indexer().index_ids(
list(Webapp.objects.values_list('id', flat=True)))
super(BaseTestFeedESView, self).setUp()
示例4: tearDown
# 需要导入模块: from mkt.webapps.models import Webapp [as 别名]
# 或者: from mkt.webapps.models.Webapp import get_indexer [as 别名]
def tearDown(self):
Webapp.get_indexer().unindexer(_all=True)
Website.get_indexer().unindexer(_all=True)
super(TestMultiSearchView, self).tearDown()