-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/bioinformatics-ua/GeoDrop…
…down.js Conflicts: geowebservice/geodatabase/services.py
- Loading branch information
Showing
13 changed files
with
92 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -58,6 +58,6 @@ | |
</footer> | ||
</body> | ||
|
||
<html> | ||
</html> | ||
|
||
|
Empty file.
Empty file.
35 changes: 35 additions & 0 deletions
35
geowebservice/geodatabase/management/commands/load_data.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# -*- coding: utf-8 -*- | ||
from __future__ import print_function | ||
import pysolr | ||
|
||
from django.core.management.base import BaseCommand, CommandError | ||
|
||
import ast | ||
from django.conf import settings | ||
|
||
from geodatabase.services import ServiceSolr | ||
|
||
import logging | ||
logger = logging.getLogger() | ||
logging.basicConfig(level=logging.DEBUG) | ||
|
||
class Command(BaseCommand): | ||
help = 'Closes the specified poll for voting' | ||
|
||
def add_arguments(self, parser): | ||
parser.add_argument('all', nargs='+', type=str) | ||
parser.add_argument('countries', nargs='+', type=str) | ||
|
||
def handle(self, *args, **options): | ||
all_locations = '' | ||
countries_names = '' | ||
try: | ||
all_locations = options['all'][0] | ||
countries_names = options['countries'][0] | ||
except: | ||
all_locations = '/home/leonardo/Área de Trabalho/geonames_files/allCountries.txt' | ||
countries_names = '/home/leonardo/Área de Trabalho/geonames_files/country.csv' | ||
|
||
s = ServiceSolr() | ||
s.load_contry_info(countries_names) | ||
s.load_initial_data(all_locations) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -174,7 +174,7 @@ | |
} | ||
} | ||
|
||
SOLR_HOST = "solr" | ||
SOLR_HOST = "localhost" | ||
SOLR_PORT = "8983" | ||
SOLR_PATH = "/solr" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters