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
92fb36e9
Commit
92fb36e9
authored
Apr 15, 2019
by
Ulises Morales Ramírez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
descripcion reportes
parent
cea0dbaf
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
16 additions
and
9 deletions
+16
-9
show_cart.html
catalog/templates/show_cart.html
+3
-3
views.py
catalog/views.py
+4
-2
Reports.html
reports/templates/Reports.html
+1
-1
aside.html
reports/templates/aside.html
+1
-0
views.py
reports/views.py
+7
-3
No files found.
catalog/templates/show_cart.html
View file @
92fb36e9
...
@@ -258,9 +258,9 @@
...
@@ -258,9 +258,9 @@
<img alt="" border="0"
<img alt="" border="0"
src="https://www.sandbox.paypal.com/es_XC/i/scr/pixel.gif" width="1"
src="https://www.sandbox.paypal.com/es_XC/i/scr/pixel.gif" width="1"
height="1">
height="1">
</form>
</form
--
>
<
!--
form method="post" action="http://repsat.geoint.mx/catalog/ipn/">
<form
method=
"post"
action=
"http://repsat.geoint.mx/catalog/ipn/"
>
<input
type=
"text"
name=
"nombre"
value=
""
>
<input
type=
"text"
name=
"nombre"
value=
""
>
<input
type=
"submit"
>
<input
type=
"submit"
>
</form>
</form>
...
@@ -268,7 +268,7 @@
...
@@ -268,7 +268,7 @@
<form
method=
"post"
action=
"../ipn/"
>
<form
method=
"post"
action=
"../ipn/"
>
<input
type=
"text"
name=
"nombre"
value=
""
>
<input
type=
"text"
name=
"nombre"
value=
""
>
<input
type=
"submit"
>
<input
type=
"submit"
>
</form
--
>
</form>
</div>
</div>
...
...
catalog/views.py
View file @
92fb36e9
...
@@ -618,10 +618,12 @@ def IPN(request):
...
@@ -618,10 +618,12 @@ def IPN(request):
PATH_USERS
=
config
[
'PATHS'
][
'PATH_USERS'
]
PATH_USERS
=
config
[
'PATHS'
][
'PATH_USERS'
]
f
=
open
(
PATH_USERS
+
"myfile.txt"
,
"w"
)
f
=
open
(
PATH_USERS
+
"myfile.txt"
,
"w"
)
x
=
request
.
POST
.
dict
()
x
=
request
.
POST
.
dict
()
f
.
write
(
'variables'
)
f
.
write
(
'variables
\n
'
)
f
.
write
(
request
.
META
[
'HTTP_REFERER'
]
+
'
\n
'
)
for
key
,
value
in
x
.
items
():
for
key
,
value
in
x
.
items
():
f
.
write
(
key
+
": "
+
value
+
'
\n
'
)
f
.
write
(
key
+
": "
+
value
+
'
\n
'
)
return
redirect
(
'../../'
)
#return redirect('../../')
return
HttpResponseRedirect
(
reverse
(
'map'
))
#print("content-type: text/html\r\n\r\n")
#print("content-type: text/html\r\n\r\n")
#if request.POST.get['payment_status'] == 'Completed':
#if request.POST.get['payment_status'] == 'Completed':
...
...
reports/templates/Reports.html
View file @
92fb36e9
...
@@ -166,7 +166,7 @@
...
@@ -166,7 +166,7 @@
<!--div id="popover-content-logout" class="hide"-->
<!--div id="popover-content-logout" class="hide"-->
<div
class=
"panel panel-default"
>
<div
class=
"panel panel-default"
>
<div
class=
"panel-heading"
>
Reports
</div>
<div
class=
"panel-heading"
>
Reports
{{ request.META.HTTP_REFERER }}
</div>
<div
class=
"panel-body"
id=
"mytable"
>
<div
class=
"panel-body"
id=
"mytable"
>
<table
data-toggle=
"table"
id=
"example"
class=
"table table-striped table-bordered"
<table
data-toggle=
"table"
id=
"example"
class=
"table table-striped table-bordered"
style=
"width:100%"
>
style=
"width:100%"
>
...
...
reports/templates/aside.html
View file @
92fb36e9
...
@@ -164,6 +164,7 @@
...
@@ -164,6 +164,7 @@
<i
class=
"fa fa-file-code-o"
></i>
<i
class=
"fa fa-file-code-o"
></i>
<span>
Export to JSON
</span>
<span>
Export to JSON
</span>
<span
class=
"pull-right-container"
>
<span
class=
"pull-right-container"
>
<span
class=
"label label-primary pull-right"
></span>
<span
class=
"label label-primary pull-right"
></span>
</span>
</span>
</a>
</a>
...
...
reports/views.py
View file @
92fb36e9
...
@@ -9,7 +9,7 @@ import xml.etree.ElementTree as ET
...
@@ -9,7 +9,7 @@ import xml.etree.ElementTree as ET
from
collections
import
OrderedDict
from
collections
import
OrderedDict
from
datetime
import
datetime
from
datetime
import
datetime
from
django.http
import
HttpResponse
,
Http404
,
JsonResponse
,
FileResponse
from
django.http
import
HttpResponse
,
Http404
,
JsonResponse
,
FileResponse
,
HttpRequest
from
django.shortcuts
import
render
,
redirect
from
django.shortcuts
import
render
,
redirect
from
reportlab.lib.pagesizes
import
letter
from
reportlab.lib.pagesizes
import
letter
from
reportlab.pdfgen
import
canvas
from
reportlab.pdfgen
import
canvas
...
@@ -107,6 +107,9 @@ def Reports(request):
...
@@ -107,6 +107,9 @@ def Reports(request):
size
=
0
size
=
0
folders
=
[]
folders
=
[]
zip
=
""
zip
=
""
product_list
=
Purchase
.
objects
.
values
(
'id'
,
'productList'
,
'aggreg_date'
,
'search__clouds'
,
'search__startDate'
,
product_list
=
Purchase
.
objects
.
values
(
'id'
,
'productList'
,
'aggreg_date'
,
'search__clouds'
,
'search__startDate'
,
'search__endDate'
,
'search__process_id__name'
,
'search__search_name'
,
'search__endDate'
,
'search__process_id__name'
,
'search__search_name'
,
'is_public'
,
'name'
,
'description'
)
.
filter
(
'is_public'
,
'name'
,
'description'
)
.
filter
(
...
@@ -592,7 +595,8 @@ def PDFGenerator(request,purchase_id):
...
@@ -592,7 +595,8 @@ def PDFGenerator(request,purchase_id):
story
.
append
(
PageBreak
())
story
.
append
(
PageBreak
())
# build our document with the list of flowables we put together
# build our document with the list of flowables we put together
doc
=
SimpleDocTemplate
(
ruta
+
reporteDir
+
".pdf"
,
pagesize
=
letter
,
topMargin
=
0
)
doc
=
SimpleDocTemplate
(
ruta
+
reporteDir
+
".pdf"
,
pagesize
=
letter
,
topMargin
=
5
)
doc
.
build
(
story
)
doc
.
build
(
story
)
#return HttpResponse (request.POST.get('ruta'))
#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