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
a0b1fd44
Commit
a0b1fd44
authored
Apr 03, 2019
by
Ulises Morales Ramírez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
descripcion reportes
parent
c54eb82d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
6 deletions
+7
-6
views.py
administration/views.py
+0
-1
views.py
reports/views.py
+7
-5
No files found.
administration/views.py
View file @
a0b1fd44
...
...
@@ -196,7 +196,6 @@ def wsPurchasesPM(request):
'storage'
:
storage
,
'in_process'
:
pending
.
count
(),
})
print
(
table_data
)
return
HttpResponse
(
json
.
dumps
(
table_data
))
else
:
raise
Http404
...
...
reports/views.py
View file @
a0b1fd44
...
...
@@ -16,6 +16,7 @@ from reportlab.pdfgen import canvas
from
django.views.decorators.csrf
import
csrf_exempt
from
GeoInt_SIDT.settings
import
BASE_URL
from
administration.views
import
best_unit_size
from
catalog.models
import
Purchase
from
reportlab.pdfgen.canvas
import
Canvas
...
...
@@ -135,11 +136,10 @@ def Reports(request):
for
p
in
json
.
loads
(
producto
[
'productList'
]):
size
=
size
+
float
(
p
[
'info'
][
'size'
][:
-
3
])
if
size
>
1000
:
size2
=
size
/
1000
final_size
=
str
(
round
(
size2
,
2
))
+
" GB"
else
:
final_size
=
str
(
round
(
size
,
2
))
+
" MB"
size
=
size
*
1048576
final_size
=
best_unit_size
(
size
)
initial_folder
=
"."
absolute_path
=
USERS_PATH
+
request
.
user
.
email
+
"/"
+
str
(
producto
[
'id'
])
+
"/"
...
...
@@ -456,6 +456,8 @@ def PDFGenerator(request, ruta, reporteDir, datasets,searchInfo):
story
=
[]
story
.
append
(
tileinfo
(
"hola"
))
# define the style for our paragraph text
styles
=
getSampleStyleSheet
()
styles2
=
getSampleStyleSheet
()
...
...
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