コード例 #1
0
ファイル: models.py プロジェクト: smillaedler/mozillians
def update_search_index(sender, instance, **kwargs):
    if instance.is_complete:
        index_objects.delay(sender, [instance.id], public=False)
        if instance.is_public_indexable:
            index_objects.delay(sender, [instance.id], public_index=True)
        else:
            unindex_objects(UserProfile, [instance.id], public_index=True)
コード例 #2
0
def update_search_index(sender, instance, **kwargs):
    if instance.is_complete:
        index_objects.delay(sender, [instance.id], public=False)
        if instance.is_public_indexable:
            index_objects.delay(sender, [instance.id], public_index=True)
        else:
            unindex_objects(UserProfile, [instance.id], public_index=True)
コード例 #3
0
ファイル: models.py プロジェクト: smillaedler/mozillians
def remove_from_search_index(sender, instance, **kwargs):
    unindex_objects(UserProfile, [instance.id], public_index=False)
    unindex_objects(UserProfile, [instance.id], public_index=True)
コード例 #4
0
def remove_from_search_index(sender, instance, **kwargs):
    unindex_objects(UserProfile, [instance.id], public_index=False)
    unindex_objects(UserProfile, [instance.id], public_index=True)