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
9582b653
Commit
9582b653
authored
Feb 21, 2019
by
Ulises Morales Ramírez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
parchado de errores
parent
33097eed
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
6 deletions
+11
-6
models.py
catalog/models.py
+1
-1
views.py
catalog/views.py
+1
-1
views.py
reports/views.py
+9
-4
No files found.
catalog/models.py
View file @
9582b653
...
...
@@ -72,4 +72,4 @@ class Purchase(models.Model):
productList
=
models
.
TextField
(
verbose_name
=
"JSON Product List"
)
purchased
=
models
.
BooleanField
(
default
=
False
)
price
=
models
.
FloatField
(
default
=
0.0
)
progress
=
models
.
IntegerField
(
default
=
0
,
max_length
=
3
)
progress
=
models
.
IntegerField
(
default
=
0
)
catalog/views.py
View file @
9582b653
...
...
@@ -646,7 +646,7 @@ def IPN(request):
# pass
# else:
# pass
# return redirect("https://google.com.mx")
# return redirect("https://google.com.mx")
# ------------------------------------------------------
def
Registration
(
request
):
#user = User.objects.filter(email=request.POST['email'])
...
...
reports/views.py
View file @
9582b653
...
...
@@ -31,13 +31,19 @@ USERS_PATH = config['PATHS']['PATH_USERS']
def
report_L2ASCL
(
request
,
report
,
purchase_id
):
reporteDir
=
report
.
replace
(
'_sclData'
,
''
)
image_path
=
request
.
user
.
email
+
"/"
+
purchase_id
+
"/"
+
"out/"
+
reporteDir
+
"/TCI/thumbnails/"
absolute_path
=
USERS_PATH
+
request
.
user
.
email
+
"/"
+
purchase_id
+
"/out"
folders
=
os
.
listdir
(
path
=
absolute_path
)
print
(
folders
)
json_route
=
USERS_PATH
+
request
.
user
.
email
+
"/"
+
purchase_id
+
"/"
for
file
in
os
.
listdir
(
path
=
json_route
):
if
file
.
endswith
(
"_sclData.json"
)
and
not
file
.
endswith
(
"merge_out_sclData.json"
):
with
open
(
USERS_PATH
+
request
.
user
.
email
+
"/"
+
purchase_id
+
"/"
+
file
)
as
f
:
json_data
=
OrderedDict
(
json
.
load
(
f
))
if
len
(
json_data
)
==
0
:
if
file
[:
6
]
in
folders
:
folders
.
remove
(
file
[:
6
])
with
open
(
USERS_PATH
+
request
.
user
.
email
+
"/"
+
purchase_id
+
"/findProducts.json"
)
as
p
:
dataProduct
=
json
.
load
(
p
)
...
...
@@ -54,7 +60,6 @@ def report_L2ASCL(request, report, purchase_id):
folders
.
remove
(
reporteDir
)
else
:
print
(
"lleno"
)
graphData
=
dict
()
graphData
[
'type'
]
=
"line"
...
...
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