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
f04c6a86
Commit
f04c6a86
authored
Mar 14, 2019
by
Emmanuel René Huchim Puc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tile info - raise error
parent
25608314
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
views.py
reports/views.py
+5
-1
No files found.
reports/views.py
View file @
f04c6a86
...
...
@@ -294,6 +294,7 @@ def tiles(request, purchase_id, report, date, z, x, y):
if
not
os
.
path
.
exists
(
image_path
):
# raise Http404
return
HttpResponse
(
None
,
content_type
=
"image/png"
)
# image_path = USERS_PATH + 'none.png'
image
=
open
(
image_path
,
"rb"
)
.
read
()
return
HttpResponse
(
image
,
content_type
=
"image/png"
)
...
...
@@ -306,6 +307,9 @@ def tileinfo(request):
absolute_path
=
USERS_PATH
+
request
.
user
.
email
+
'/'
+
req
[
'purchase_id'
][
0
]
+
'/out'
resource_path
=
'/'
+
req
[
'report'
][
0
]
+
'/tiles'
+
'/'
+
req
[
'date'
][
0
]
+
'_TCI_60m/tilemapresource.xml'
if
not
os
.
path
.
exists
(
absolute_path
+
resource_path
):
raise
Http404
tree
=
ET
.
parse
(
absolute_path
+
resource_path
)
bounding_box
=
tree
.
find
(
'BoundingBox'
)
sets
=
[
set
.
get
(
'order'
)
for
set
in
tree
.
findall
(
'TileSets/TileSet'
)]
...
...
@@ -394,4 +398,4 @@ def PDFGenerator(path, reporteDir):
pdf
.
imagenes
()
pdf
.
output
(
path
+
reporteDir
+
'.pdf'
,
'F'
)
\ No newline at end of file
pdf
.
output
(
path
+
reporteDir
+
'.pdf'
,
'F'
)
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