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
26f67673
Commit
26f67673
authored
Mar 12, 2019
by
Sergio Adrian Gongora Euan
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://gitlab.geoint.mx/mario.chirinos/GeoInt_SIDT
into dev
parents
fda542e3
25fb31e6
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
10 deletions
+15
-10
views.py
reports/views.py
+15
-10
No files found.
reports/views.py
View file @
26f67673
...
@@ -32,10 +32,15 @@ USERS_PATH = config['PATHS']['PATH_USERS']
...
@@ -32,10 +32,15 @@ USERS_PATH = config['PATHS']['PATH_USERS']
def
report_L2ASCL
(
request
,
report
,
purchase_id
):
def
report_L2ASCL
(
request
,
report
,
purchase_id
):
reporteDir
=
report
.
replace
(
'_sclData'
,
''
)
reporteDir
=
report
.
replace
(
'_sclData'
,
''
)
path
=
USERS_PATH
+
request
.
user
.
email
+
'/'
+
purchase_id
+
'/'
if
os
.
path
.
isfile
(
path
+
reporteDir
+
'.pdf'
):
pass
else
:
##########################################
##########################################
# Generador de pdfs #
# Generador de pdfs #
##########################################
##########################################
PDFGenerator
(
request
,
reporteDir
,
purchase_id
)
PDFGenerator
(
path
,
reporteDir
)
##########################################
##########################################
# Generador de pdfs #
# Generador de pdfs #
##########################################
##########################################
...
@@ -282,7 +287,7 @@ def wsProcessProgress(request):
...
@@ -282,7 +287,7 @@ def wsProcessProgress(request):
# result.get()
# result.get()
# return render_to_response('reports_table.html', {"result": result.get()})
# return render_to_response('reports_table.html', {"result": result.get()})
def
PDFGenerator
(
request
,
reporteDir
,
purchase_id
):
def
PDFGenerator
(
path
,
reporteDir
):
class
PDF
(
FPDF
):
class
PDF
(
FPDF
):
def
header
(
self
):
def
header
(
self
):
...
@@ -340,5 +345,5 @@ def PDFGenerator(request, reporteDir, purchase_id):
...
@@ -340,5 +345,5 @@ def PDFGenerator(request, reporteDir, purchase_id):
for
i
in
range
(
1
,
5
):
for
i
in
range
(
1
,
5
):
pdf
.
imagenes
()
pdf
.
imagenes
()
path
=
USERS_PATH
+
request
.
user
.
email
+
'/'
+
purchase_id
+
'/'
pdf
.
output
(
path
+
reporteDir
+
'.pdf'
,
'F'
)
pdf
.
output
(
path
+
reporteDir
+
'.pdf'
,
'F'
)
\ No newline at end of file
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