Commit 27983368 authored by Mario Chirinos Colunga's avatar Mario Chirinos Colunga 💬

api ok

parent 4c69c454
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
# -*- coding: utf-8 -*-
# Generated by Django 1.10.7 on 2017-07-11 14:33
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Platform',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=64)),
('acronym', models.CharField(max_length=16)),
],
),
]
No preview for this file type
...@@ -3,5 +3,5 @@ ...@@ -3,5 +3,5 @@
} }
body body
{ {
color:white; /* color:white;*/
} }
...@@ -3,9 +3,10 @@ ...@@ -3,9 +3,10 @@
position:fixed; position:fixed;
top:0px; top:0px;
left:0px; left:0px;
border: 1px solid DarGrey; border: 1px solid DarkSlateGray;
background-color: rgba(50,50,50,0.8); background-color: rgba(250,250,255,0.8);
width:320px; color:DarkSlateGray;
width:300px;
height:100%; height:100%;
font-size:0.8em; font-size:0.8em;
} }
......
...@@ -3,9 +3,44 @@ ...@@ -3,9 +3,44 @@
position:absolute; position:absolute;
top:0; top:0;
right:0; right:0;
border: 1px solid blue; width: 350px;
width: 256px;
height: 100%; height: 100%;
background-color: rgba(50,50,50,0.8); border: 1px solid DarkSlateGray;
background-color: rgba(250,250,255,0.8);
color:DarkSlateGray;
} }
.catalog li
{
/* border:2px solid blue;*/
list-style: none;
height: 64px;
font-size:0.6em;
}
.catalog li div
{
display:inline-block;
}
.buyIcon
{
display:inline-block;
/* border:2px solid blue;*/
/* border:none;*/
/* background-color:rgba(255,255,255,1);*/
opacity:0.7;
width:64px;
height:64px;
background-image: url("../images/star.png");
background-size: 50px 50px;
background-position: center;
background-repeat: no-repeat;
cursor:pointer;
transition: 0.2s;
}
.buyIcon:hover
{
opacity:1;
margin:0;
background-size: 60px 60px;
transition: 0.2s;
}
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
<div id="leftPanel"> <div id="leftPanel">
<form id="searchForm" action="/catalog/productlist/" method="post" target="catalogFrame"> <form id="searchForm" action="/catalog/productlist/" method="post" target="catalogFrame">
{% csrf_token %} {% csrf_token %}
<input type="submit" value="search" onclick="submitSearchForm()" /> <input type="submit" value="search" />
<table>{{ searchForm.as_table }}</table> <table>{{ searchForm.as_table }}</table>
</form> </form>
</div> </div>
......
<!DOCTYPE html>
{% load static %}
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="{% static 'css/rightPanel.css'%}" type="text/css">
</head>
<body>
<ul class="catalog">
{% for i in catalog %}
<li>
<div><img src="{{i.thumbnailUrl}}" width="64px"/></div>
<div>
{{i.productName}}<br>
{{i.sceneDate}}
</div>
<div class="buyIcon"></div>
</li>
{% endfor %}
</ul>
</body>
</html>
hola hola
No preview for this file type
...@@ -26,10 +26,11 @@ def producList(request): ...@@ -26,10 +26,11 @@ def producList(request):
r2 = dict(request.POST) r2 = dict(request.POST)
r2.pop('csrfmiddlewaretoken', None) r2.pop('csrfmiddlewaretoken', None)
url = 'https://api.daac.asf.alaska.edu/services/search/'+urlencode(r2, 'utf-8')+"&output=JSON" url = 'https://api.daac.asf.alaska.edu/services/search/param?'+urlencode(r2, 'utf-8')+"&output=JSON"
print url print url
response = requests.get(url) response = requests.get(url)
print response.json() json = response.json()
return render(request,'productList.html',{})
return render(request,'productList.html',{"catalog":json[0]})
No preview for this file type
No preview for this file type
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment