Python django.core.management.BaseCommand() Examples

The following are 1 code examples of django.core.management.BaseCommand(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module django.core.management , or try the search function .
Example #1
Source File: calc_page_pop.py    From ahmia-site with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
def __init__(self):
        super(BaseCommand, self).__init__()

        self.es_obj = Elasticsearch(
            hosts=settings.ELASTICSEARCH_SERVERS,
            timeout=settings.ELASTICSEARCH_TIMEOUT,
            connection_class=RequestsHttpConnection
        )
        self.es_index = utils.get_elasticsearch_tor_index()