Skip to content

Instantly share code, notes, and snippets.

@gurglet
Created February 1, 2012 13:52
Show Gist options
  • Save gurglet/1717020 to your computer and use it in GitHub Desktop.
Save gurglet/1717020 to your computer and use it in GitHub Desktop.
Hur man indexerar om en modell.
from haystack.sites import site
from planner.models import SharedMealPlan
# Make sure the search index is registered
import planner.search_indexes
index = site.get_index(SharedMealPlan)
index.reindex()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment