Commit 542e40c2 authored by Sergio Adrian Gongora Euan's avatar Sergio Adrian Gongora Euan
parents e6930861 868c404f
...@@ -13,16 +13,31 @@ from django.core import management ...@@ -13,16 +13,31 @@ from django.core import management
#from collections import OrderedDict #from collections import OrderedDict
import requests, json, unicodedata, sys, base64 import requests, json, unicodedata, sys, base64
import os import os
import sys import sys
sys.path.append('/home/luis/django-apps/Geosentinel')
from geosentinel import APISentinel, polygonToBox from geosentinel import APISentinel, polygonToBox
sentinel = APISentinel.APISentinel('emmhp', 'geoemm29') ###########3 lee archivo de configuración ################
################################################################################ dirname = os.path.dirname(__file__)
# PONER EL NOMBRE DE SU MAQUINA # configfile = os.path.join(dirname, '../config/config.json')
################################################################################
NAS_PATH = '/home/ulises/NAS/' with open(configfile, 'r') as f:
config = json.load(f)
print(config['PATHS']['PATH_GEOSENTINEL'])
print(config['PATHS']['PATH_NAS'])
print(config['API_SENTINEL']['SENTINEL_USER'])
print(config['API_SENTINEL']['SENTINEL_PASS'])
NAS_PATH = config['PATHS']['PATH_NAS']
SENTINEL_PATH = config['PATHS']['PATH_GEOSENTINEL']
API_SENTINEL_USER = config['API_SENTINEL']['SENTINEL_USER']
API_SENTINEL_PATH = config['API_SENTINEL']['SENTINEL_PASS']
###########################################################
sys.path.append(SENTINEL_PATH)
sentinel = APISentinel.APISentinel(API_SENTINEL_USER, API_SENTINEL_PATH)
# Create your views here. # Create your views here.
......
{
"PATHS": {
"PATH_GEOSENTINEL": "/home/david/centroGEO/repsat/Geosentinel",
"PATH_NAS": "/home/david/NAS/"
},
"API_SENTINEL": {
"SENTINEL_USER" : "emmhp",
"SENTINEL_PASS" : "geoemm29"
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment