Tuesday, March 25, 2014

Re: run manage.py commands within app

On Sun, Mar 23, 2014 at 11:46 PM, judy wawira <judywawira@gmail.com> wrote:
> Hello I have a django app using haystack and a solr backend to power
> searches
>
> There is dynamic addition of data and wonder if there are other ways to
> automatically rebuild the solr index without manually going to the command
> line to run manage.py rebuild_index
>
> Thanks

from django.core import management
management.call_command('rebuild_index',)


Cheers

Tom

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAFHbX1J%3DW_rfQSG7_zfR0EHvk-R89GVR3AWmjmop7ezSL085NQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment