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
5d275711
Commit
5d275711
authored
Feb 05, 2019
by
Mario Chirinos Colunga
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
models
parent
dcb2f831
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
8 deletions
+20
-8
models.py
catalog/models.py
+18
-7
views.py
catalog/views.py
+2
-1
No files found.
catalog/models.py
View file @
5d275711
...
@@ -47,14 +47,25 @@ class CartProduct(models.Model):
...
@@ -47,14 +47,25 @@ class CartProduct(models.Model):
info
=
models
.
TextField
(
null
=
True
)
info
=
models
.
TextField
(
null
=
True
)
purchased
=
models
.
NullBooleanField
()
purchased
=
models
.
NullBooleanField
()
#-------------------------------------------------------------------------------------------
# modelo para los procesos del sizebar del view map
class
Process
(
models
.
Model
):
class
Process
(
models
.
Model
):
tag
=
models
.
CharField
(
max_length
=
50
)
name
=
models
.
CharField
(
max_length
=
50
)
platform
=
models
.
ForeignKey
(
Platform
,
on_delete
=
models
.
CASCADE
,
default
=
''
)
productLevel
=
models
.
CharField
(
max_length
=
8
)
class
Search
(
models
.
Model
):
user
=
models
.
ForeignKey
(
User
,
on_delete
=
models
.
CASCADE
)
startDate
=
models
.
DateTimeField
(
verbose_name
=
'Start Date'
)
endDate
=
models
.
DateTimeField
(
verbose_name
=
'End Date'
)
process
=
models
.
ForeignKey
(
Process
,
on_delete
=
models
.
CASCADE
,
default
=
''
)
clouds
=
models
.
IntegerField
(
default
=
4
)
class
Purchase
(
models
.
Model
):
user
=
models
.
ForeignKey
(
User
,
on_delete
=
models
.
CASCADE
)
search
=
models
.
ForeignKey
(
Search
,
on_delete
=
models
.
CASCADE
)
productList
=
models
.
TextField
(
verbose_name
=
"JSON Product List"
)
purchased
=
models
.
BooleanField
(
default
=
False
)
price
=
models
.
FloatField
(
default
=
0.0
)
# class Purchase(models.Model):
# user = models.ForeignKey(User, on_delete=models.CASCADE)
# pur_date = models.DateTimeField(auto_now=True) ## transaction date
# prod_list = models.ManyToManyField(Product_l1c)
catalog/views.py
View file @
5d275711
...
@@ -13,7 +13,8 @@ from django.core import management
...
@@ -13,7 +13,8 @@ from django.core import management
#from collections import OrderedDict
#from collections import OrderedDict
import
requests
,
json
,
unicodedata
,
sys
,
base64
import
requests
,
json
,
unicodedata
,
sys
,
base64
sys
.
path
.
append
(
'../'
)
import
sys
sys
.
path
.
append
(
'../GeoSentinel/'
)
from
geosentinel
import
APISentinel
,
polygonToBox
from
geosentinel
import
APISentinel
,
polygonToBox
sentinel
=
APISentinel
.
APISentinel
(
'emmhp'
,
'geoemm29'
)
sentinel
=
APISentinel
.
APISentinel
(
'emmhp'
,
'geoemm29'
)
...
...
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