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
51d647ae
Commit
51d647ae
authored
Apr 15, 2019
by
Ulises Morales Ramírez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
descripcion reportes
parent
424ae8a4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
5 deletions
+5
-5
Reports.html
reports/templates/Reports.html
+1
-1
aside.html
reports/templates/aside.html
+1
-1
views.py
reports/views.py
+3
-3
No files found.
reports/templates/Reports.html
View file @
51d647ae
...
...
@@ -240,7 +240,7 @@
href=
"{% url 'PDF' product.purchase_id %}"
{%
else
%}
href=
"#"
{%
endif
%}
class=
"btn btn-info btn-sm col-md-4 col-xs-4 col-sm-4 col-lg-4 col-xl-4"
target=
"_blank"
download=
"
Report
"
>
{%
endif
%}
class=
"btn btn-info btn-sm col-md-4 col-xs-4 col-sm-4 col-lg-4 col-xl-4"
target=
"_blank"
download=
"
{{ product.search_name }} ({{ product.purchase_date }}).pdf
"
>
<i
class=
"fa fa-file-pdf-o"
></i>
</a>
<!--a title="View Log" href="#" class="btn btn-info"
...
...
reports/templates/aside.html
View file @
51d647ae
...
...
@@ -170,7 +170,7 @@
</a>
</li>
<li>
<a
class=
"treeview submenu"
href=
"{% url 'PDF' purchaseID %}"
target=
"_blank"
download=
"
Report
"
>
<a
class=
"treeview submenu"
href=
"{% url 'PDF' purchaseID %}"
target=
"_blank"
download=
"
{{ searchInfo.title }} ({{ searchInfo.purchase_date }}).pdf
"
>
<i
class=
"fa fa-file-pdf-o"
></i>
<span>
Export to PDF
</span>
<span
class=
"pull-right-container"
>
...
...
reports/views.py
View file @
51d647ae
...
...
@@ -48,7 +48,7 @@ def report_L2ASCL(request, purchase_id):
reporteDir
=
'mask'
folders
=
""
purchase
=
Purchase
.
objects
.
values
(
'user__email'
,
'is_public'
,
'name'
,
'search__search_name'
,
'search__process_id__name'
,
'description'
)
.
get
(
pk
=
purchase_id
)
'search__process_id__name'
,
'description'
,
'aggreg_date'
)
.
get
(
pk
=
purchase_id
)
email
=
purchase
[
'user__email'
]
path
=
USERS_PATH
+
email
+
'/'
+
purchase_id
+
'/'
scl_data_path
=
USERS_PATH
+
email
+
"/"
+
purchase_id
+
"/scl_data.json"
...
...
@@ -71,6 +71,7 @@ def report_L2ASCL(request, purchase_id):
"title"
:
purchase
[
'name'
],
#"title": purchase['search__search_name'],
"process"
:
purchase
[
'search__process_id__name'
],
"purchase_date"
:
purchase
[
'aggreg_date'
],
"startDate"
:
startDate
,
"endDate"
:
endDate
,
"clouds"
:
dataProduct
[
'clouds'
],
...
...
@@ -595,8 +596,7 @@ def PDFGenerator(request,purchase_id):
story
.
append
(
PageBreak
())
# build our document with the list of flowables we put together
doc
=
SimpleDocTemplate
(
ruta
+
reporteDir
+
".pdf"
,
pagesize
=
letter
,
topMargin
=
5
)
doc
=
SimpleDocTemplate
(
ruta
+
reporteDir
+
".pdf"
,
pagesize
=
letter
,
topMargin
=
5
,
title
=
searchInfo
[
'report_name'
]
+
" "
+
searchInfo
[
'title'
],)
doc
.
build
(
story
)
#return HttpResponse (request.POST.get('ruta'))
...
...
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