def setUpClass(cls): """Runs the :class:`TestCase` setup to add some data. Also re-creates indexes respecting data mappings, flushes and refreshes the data so it's searchable via computer. """ estestcase.ESTestCase.setUpClass() TestCase.setUpClass() # Add on demand more models here. index_all_profiles() # Allow time for ES to index stuff sleep(1)
def index_profiles(self, request): """Fire an Elastic Search Index Profiles task.""" index_all_profiles() messages.success(request, 'Profile indexing started.') return HttpResponseRedirect(reverse('admin:users_userprofile_changelist'))
def index_profiles(self, request): """Fire an Elastic Search Index Profiles task.""" index_all_profiles() messages.success(request, "Profile indexing started.") return HttpResponseRedirect(reverse("admin:auth_user_changelist"))