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
#from collections import OrderedDict
import requests, json, unicodedata, sys, base64
import os
import sys
sys.path.append('/home/luis/django-apps/Geosentinel')
from geosentinel import APISentinel, polygonToBox
sentinel = APISentinel.APISentinel('emmhp', 'geoemm29')
################################################################################
# PONER EL NOMBRE DE SU MAQUINA #
################################################################################
NAS_PATH = '/home/ulises/NAS/'
###########3 lee archivo de configuración ################
dirname = os.path.dirname(__file__)
configfile = os.path.join(dirname, '../config/config.json')
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.
......@@ -537,4 +552,4 @@ def showCart(request):
#-------------------------------------
def Pay (request):
Purchase.objects.filter(user_id=request.user.id, purchased=0).update(purchased=True)
return redirect('../../reports')
\ No newline at end of file
return redirect('../../reports')
{
"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