Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
GeoInt_SIDT
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Mario Chirinos Colunga
GeoInt_SIDT
Commits
f3e834a1
Commit
f3e834a1
authored
Feb 11, 2019
by
Ulises Morales Ramírez
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'ipn_paypal' into 'dev'
Ipn paypal See merge request
!9
parents
3c7cba87
359d395c
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
8 additions
and
9 deletions
+8
-9
.gitignore
.gitignore
+1
-0
show_cart.html
catalog/templates/show_cart.html
+2
-2
views.py
catalog/views.py
+0
-4
L2ASCL_data.html
reports/templates/L2ASCL_data.html
+3
-1
views.py
reports/views.py
+2
-2
No files found.
.gitignore
View file @
f3e834a1
# project
# project
.idea/
.idea/
config/
geosentinel/
geosentinel/
geosentinel
geosentinel
db.sqlite3-journal
db.sqlite3-journal
...
...
catalog/templates/show_cart.html
View file @
f3e834a1
...
@@ -201,9 +201,9 @@
...
@@ -201,9 +201,9 @@
</tbody>
</tbody>
<tfoot>
<tfoot>
<tr>
<tr>
<
!--
td>
<td>
<a
href=
"../pay"
class=
"btn btn-primary pull-right"
>
Pay
</a>
<a
href=
"../pay"
class=
"btn btn-primary pull-right"
>
Pay
</a>
</td
--
>
</td>
<td
class=
"text-center"
>
<td
class=
"text-center"
>
<form
action=
"https://www.sandbox.paypal.com/cgi-bin/webscr"
method=
"post"
>
<form
action=
"https://www.sandbox.paypal.com/cgi-bin/webscr"
method=
"post"
>
<input
type=
"hidden"
name=
"cmd"
value=
"_cart"
>
<input
type=
"hidden"
name=
"cmd"
value=
"_cart"
>
...
...
catalog/views.py
View file @
f3e834a1
...
@@ -13,10 +13,6 @@ from django.contrib.auth.models import User
...
@@ -13,10 +13,6 @@ from django.contrib.auth.models import User
import
requests
,
json
,
unicodedata
,
sys
,
base64
import
requests
,
json
,
unicodedata
,
sys
,
base64
import
os
import
os
from
geosentinel
import
APISentinel
,
polygonToBox
from
geosentinel
import
APISentinel
,
polygonToBox
import
cgi
import
collections
import
urllib
from
urllib
import
parse
########### lee archivo de configuración ################
dirname
=
os
.
path
.
dirname
(
__file__
)
dirname
=
os
.
path
.
dirname
(
__file__
)
configfile
=
os
.
path
.
join
(
dirname
,
'../config/config.json'
)
configfile
=
os
.
path
.
join
(
dirname
,
'../config/config.json'
)
...
...
reports/templates/L2ASCL_data.html
View file @
f3e834a1
...
@@ -377,7 +377,9 @@
...
@@ -377,7 +377,9 @@
if
(
!
firstPoint
)
return
;
if
(
!
firstPoint
)
return
;
label
=
myChart
.
data
.
labels
[
firstPoint
.
_index
];
label
=
myChart
.
data
.
labels
[
firstPoint
.
_index
];
document
.
getElementById
(
"satImage"
).
src
=
"../../static/reports/tmpImages/"
+
label
+
"_TCI_60m.jpg"
//alert("{{ IMAGE_PATH }}"+label+"_TCI_60m.jpg");
document
.
getElementById
(
"satImage"
).
src
=
"{{ IMAGE_PATH }}"
+
label
+
"_TCI_60m.jpg"
;
//document.getElementById("satImage").src = "../../static/reports/tmpImages/" + label + "_TCI_60m.jpg"
};
};
// cambiar el tipo de gráfica
// cambiar el tipo de gráfica
...
...
reports/views.py
View file @
f3e834a1
...
@@ -30,6 +30,7 @@ USERS_PATH = config['PATHS']['PATH_USERS']
...
@@ -30,6 +30,7 @@ USERS_PATH = config['PATHS']['PATH_USERS']
def
report_L2ASCL
(
request
,
report
,
purchase_id
):
def
report_L2ASCL
(
request
,
report
,
purchase_id
):
image_path
=
USERS_PATH
+
request
.
user
.
email
+
"/"
+
purchase_id
+
"/"
+
"out/T15QZD/TCI/"
with
open
(
USERS_PATH
+
request
.
user
.
email
+
"/"
+
purchase_id
+
"/"
+
report
+
".json"
)
as
f
:
with
open
(
USERS_PATH
+
request
.
user
.
email
+
"/"
+
purchase_id
+
"/"
+
report
+
".json"
)
as
f
:
json_data
=
OrderedDict
(
json
.
load
(
f
))
json_data
=
OrderedDict
(
json
.
load
(
f
))
graphData
=
dict
()
graphData
=
dict
()
...
@@ -66,7 +67,7 @@ def report_L2ASCL(request, report,purchase_id):
...
@@ -66,7 +67,7 @@ def report_L2ASCL(request, report,purchase_id):
# graphData['options']['maintainAspectRatio']=False
# graphData['options']['maintainAspectRatio']=False
# print(json.dumps(graphData).encode("utf-8"))
# print(json.dumps(graphData).encode("utf-8"))
return
render
(
request
,
'L2ASCL_data.html'
,
{
"graphData"
:
json
.
dumps
(
graphData
),
"report_name"
:
report
})
return
render
(
request
,
'L2ASCL_data.html'
,
{
"graphData"
:
json
.
dumps
(
graphData
),
"report_name"
:
report
,
"IMAGE_PATH"
:
image_path
})
# -------------------------------------------------------------------------------def Reports(request):
# -------------------------------------------------------------------------------def Reports(request):
...
@@ -74,7 +75,6 @@ def report_L2ASCL(request, report,purchase_id):
...
@@ -74,7 +75,6 @@ def report_L2ASCL(request, report,purchase_id):
def
Reports
(
request
):
def
Reports
(
request
):
productList
=
[]
productList
=
[]
product_list
=
Purchase
.
objects
.
values
(
'id'
,
'productList'
,
'aggreg_date'
,
'search__clouds'
,
'search__startDate'
,
'search__endDate'
,
'search__process_id__name'
)
.
filter
(
user_id
=
request
.
user
.
id
,
purchased
=
1
)
product_list
=
Purchase
.
objects
.
values
(
'id'
,
'productList'
,
'aggreg_date'
,
'search__clouds'
,
'search__startDate'
,
'search__endDate'
,
'search__process_id__name'
)
.
filter
(
user_id
=
request
.
user
.
id
,
purchased
=
1
)
print
(
product_list
)
for
producto
in
product_list
:
for
producto
in
product_list
:
size
=
0
size
=
0
for
p
in
json
.
loads
(
producto
[
'productList'
]):
for
p
in
json
.
loads
(
producto
[
'productList'
]):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment