code dir and web changes
This commit is contained in:
parent
c0e77e3d8a
commit
3282236abe
66
code/grace_diff.pl
Executable file
66
code/grace_diff.pl
Executable file
@ -0,0 +1,66 @@
|
|||||||
|
#!/usr/bin/perl
|
||||||
|
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
use 5.010;
|
||||||
|
|
||||||
|
use autodie;
|
||||||
|
|
||||||
|
use JSON;
|
||||||
|
|
||||||
|
sub parse_json_file {
|
||||||
|
my ($filename) = @_;
|
||||||
|
|
||||||
|
local $/;
|
||||||
|
open my $fh, '<', $filename;
|
||||||
|
|
||||||
|
my $json_text = <$fh>;
|
||||||
|
|
||||||
|
my $json = decode_json($json_text) or die;
|
||||||
|
return $json;
|
||||||
|
}
|
||||||
|
|
||||||
|
sub output_json_file {
|
||||||
|
my ($json, $filename) = @_;
|
||||||
|
|
||||||
|
open my $out, '>', $filename;
|
||||||
|
|
||||||
|
my $json_text = encode_json($json);
|
||||||
|
|
||||||
|
print {$out} $json_text;
|
||||||
|
}
|
||||||
|
|
||||||
|
my $json_1 = parse_json_file('grace_1.json');
|
||||||
|
my $json_2 = parse_json_file('grace_2.json');
|
||||||
|
|
||||||
|
my $data_1 = $json_1->{data};
|
||||||
|
my $data_2 = $json_2->{data};
|
||||||
|
|
||||||
|
my $min = 0;
|
||||||
|
my $max = 0;
|
||||||
|
|
||||||
|
foreach my $x (0..$#{ $data_1 }) {
|
||||||
|
foreach my $y (0..$#{ $data_1->[$x] }) {
|
||||||
|
foreach my $z (0..$#{ $data_1->[$x][$y] }) {
|
||||||
|
my $datum_1 = $data_1->[$x][$y][$z];
|
||||||
|
my $datum_2 = $data_2->[$x][$y][$z];
|
||||||
|
my $datum
|
||||||
|
= $data_2->[$x][$y][$z]
|
||||||
|
- $data_1->[$x][$y][$z];
|
||||||
|
$datum = 32767 if ($datum_1 == 32767 or $datum_2 == 32767);
|
||||||
|
$data_1->[$x][$y][$z] = $datum;
|
||||||
|
|
||||||
|
$min = $datum if $datum < $min;
|
||||||
|
$max = $datum if $datum > $max;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
output_json_file($json_1, 'grace_1_2_diff_v2.json');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# use Data::Dumper;
|
||||||
|
#
|
||||||
|
# print Data::Dumper->Dump([parse_json_file('grace_1.json')], [qw/json/]);
|
||||||
|
|
@ -7,6 +7,11 @@ from viz import views
|
|||||||
|
|
||||||
|
|
||||||
urlpatterns = patterns('',
|
urlpatterns = patterns('',
|
||||||
url(r'^$', views.index, name='index'),
|
url(r'^1', views.index1, name='index1'),
|
||||||
|
url(r'^2', views.index2, name='index2'),
|
||||||
|
url(r'^3', views.index3, name='index3'),
|
||||||
|
url(r'^4', views.index4, name='index4'),
|
||||||
|
url(r'^data1', views.data1, name='data1.json'),
|
||||||
|
url(r'^data2', views.data2, name='data2.json'),
|
||||||
url(r'^admin/', include(admin.site.urls)),
|
url(r'^admin/', include(admin.site.urls)),
|
||||||
)
|
)
|
||||||
|
File diff suppressed because one or more lines are too long
1
viz/templates/data2.json
Normal file
1
viz/templates/data2.json
Normal file
File diff suppressed because one or more lines are too long
@ -47,7 +47,7 @@
|
|||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body onload="prettyPrint();">
|
<body onload="prettyPrint();" bgcolor="#000000">
|
||||||
<div
|
<div
|
||||||
data-viz-type="plot.xyz"
|
data-viz-type="plot.xyz"
|
||||||
xdata="http://54.201.54.194/data/GRACE.CSR.LAND.RL05.DS.G200KM.nc/lon[]"
|
xdata="http://54.201.54.194/data/GRACE.CSR.LAND.RL05.DS.G200KM.nc/lon[]"
|
||||||
@ -61,7 +61,6 @@ zlabel="Fly Controls = up,down,left,right"
|
|||||||
class="widgetRift"
|
class="widgetRift"
|
||||||
colorbar="#0000f0,#0000e0,#0000d0,#0000c0,#0000b0,#0000a0,#000090,#000080,#000070,#000060,#000050"
|
colorbar="#0000f0,#0000e0,#0000d0,#0000c0,#0000b0,#0000a0,#000090,#000080,#000070,#000060,#000050"
|
||||||
format="spherical"
|
format="spherical"
|
||||||
riftview="true"
|
|
||||||
rotating="true"
|
rotating="true"
|
||||||
id="riftWidget"
|
id="riftWidget"
|
||||||
></div>
|
></div>
|
||||||
|
101
viz/templates/index2.html
Normal file
101
viz/templates/index2.html
Normal file
@ -0,0 +1,101 @@
|
|||||||
|
|
||||||
|
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<script src="../js/prettify.min.js"></script>
|
||||||
|
<link rel="stylesheet" href="../css/prettify.min.css" type="text/css" />
|
||||||
|
<link rel="stylesheet" href="../css/sunburst.css" type="text/css" />
|
||||||
|
<script data-main="//cds.jpl.nasa.gov/widgets/plot/1.0/js/main.js" src="//cds.jpl.nasa.gov/widgets/plot/1.0/components/requirejs/require.js"></script>
|
||||||
|
<script src="http://cds.jpl.nasa.gov/libs/jquery/1.9.1/jquery.min.js"></script>
|
||||||
|
|
||||||
|
<link rel="stylesheet" type="text/css" href="../css/style.css" />
|
||||||
|
<style>
|
||||||
|
/*user defined styles. */
|
||||||
|
#riftWidget{
|
||||||
|
float:left;
|
||||||
|
width:100%;
|
||||||
|
height:100%;
|
||||||
|
position:fixed;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<script>
|
||||||
|
$(document).ready(function(){
|
||||||
|
$('#usage').hide();
|
||||||
|
//give it 10 seconds, then see if we have an oculus
|
||||||
|
setTimeout(function(){
|
||||||
|
if(typeof(vr) != "undefined"){
|
||||||
|
vr.State();
|
||||||
|
if(vr.hmd.present == false){
|
||||||
|
|
||||||
|
/*$('#usage').fadeIn();
|
||||||
|
$('.widgetRift').fadeOut();*/
|
||||||
|
$('#usage').fadeOut();
|
||||||
|
$('.widgetRift').fadeIn();
|
||||||
|
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$('#usage').fadeOut();
|
||||||
|
$('.widgetRift').fadeIn();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
//ok no VR whatsoever.
|
||||||
|
$('#usage').fadeIn();
|
||||||
|
$('.widgetRift').fadeOut();
|
||||||
|
}
|
||||||
|
},5000)
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body onload="prettyPrint();" bgcolor="#000000">
|
||||||
|
<div
|
||||||
|
data-viz-type="plot.xyz"
|
||||||
|
xdata="http://54.201.54.194/data/GRC_JPL_RL05_DPC_OCN_500_200301_201307.nc/lon[]"
|
||||||
|
xmask="[100000002004087730000]"
|
||||||
|
xlabel="lon"
|
||||||
|
ydata="http://54.201.54.194/data/GRC_JPL_RL05_DPC_OCN_500_200301_201307.nc/lat[]"
|
||||||
|
ylabel="lat"
|
||||||
|
zdata="http://54.201.54.194/data/GRC_JPL_RL05_DPC_OCN_500_200301_201307.nc/lwe_thickness[0:1]"
|
||||||
|
zmask="[-9999]"
|
||||||
|
zlabel="Fly Controls = up,down,left,right"
|
||||||
|
class="widgetRift"
|
||||||
|
colorbar="#0000f0,#0000e0,#0000d0,#0000c0,#0000b0,#0000a0,#000090,#000080,#000070,#000060,#000050"
|
||||||
|
format="spherical"
|
||||||
|
rotating="true"
|
||||||
|
id="riftWidget"
|
||||||
|
></div>
|
||||||
|
<div id="usage">
|
||||||
|
<div id="failWhale">
|
||||||
|
<pre>
|
||||||
|
......................................__................................................
|
||||||
|
.............................,-~*`¯lllllll`*~,..........................................
|
||||||
|
.......................,-~*`lllllllllllllllllllllllllll¯`*-,....................................
|
||||||
|
..................,-~*llllllllllllllllllllllllllllllllllllllllllll*-,..................................
|
||||||
|
...............,-*llllllllllllllllllllllllllllllllllllllllllllllllllllll.\.......................... .......
|
||||||
|
.............;*`lllllllllllllllllllllllllll,-~*~-,llllllllllllllllllll\................................
|
||||||
|
..............\lllllllllllllllllllllllllll/.........\;;;;llllllllllll,-`~-,......................... ..
|
||||||
|
...............\lllllllllllllllllllll,-*...........`~-~-,...(.(¯`*,`,..........................
|
||||||
|
................\llllllllllll,-~*.....................)_-\..*`*;..)..........................
|
||||||
|
.................\,-*`¯,*`)............,-~*`~................/.....................
|
||||||
|
..................|/.../.../~,......-~*,-~*`;................/.\..................
|
||||||
|
................./.../.../.../..,-,..*~,.`*~*................*...\.................
|
||||||
|
................|.../.../.../.*`...\...........................)....)¯`~,..................
|
||||||
|
................|./.../..../.......)......,.)`*~-,............/....|..)...`~-,.............
|
||||||
|
..............././.../...,*`-,.....`-,...*`....,---......\..../...../..|.........¯```*~-,,,,
|
||||||
|
...............(..........)`*~-,....`*`.,-~*.,-*......|.../..../.../............\........
|
||||||
|
................*-,.......`*-,...`~,..``.,,,-*..........|.,*...,*...|..............\........
|
||||||
|
...................*,.........`-,...)-,..............,-*`...,-*....(`-,............\.......
|
||||||
|
......................f`-,.........`-,/...*-,___,,-~*....,-*......|...`-,..........\........
|
||||||
|
</pre>
|
||||||
|
</div>
|
||||||
|
In order to use the oculus rift demo, you need:
|
||||||
|
<ul>
|
||||||
|
<li>1. An Oculus Rift</li>
|
||||||
|
<li>2. An Open Source Google Chrome Plugin that you can download and install from github here (<a alt="Required vr.js plugin for oculus rift" href="https://github.com/benvanik/vr.js">https://github.com/benvanik/vr.js</a>)
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
100
viz/templates/index3.html
Normal file
100
viz/templates/index3.html
Normal file
@ -0,0 +1,100 @@
|
|||||||
|
|
||||||
|
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<script src="../js/prettify.min.js"></script>
|
||||||
|
<link rel="stylesheet" href="../css/prettify.min.css" type="text/css" />
|
||||||
|
<link rel="stylesheet" href="../css/sunburst.css" type="text/css" />
|
||||||
|
<script data-main="//cds.jpl.nasa.gov/widgets/plot/1.0/js/main.js" src="//cds.jpl.nasa.gov/widgets/plot/1.0/components/requirejs/require.js"></script>
|
||||||
|
<script src="http://cds.jpl.nasa.gov/libs/jquery/1.9.1/jquery.min.js"></script>
|
||||||
|
|
||||||
|
<link rel="stylesheet" type="text/css" href="../css/style.css" />
|
||||||
|
<style>
|
||||||
|
/*user defined styles. */
|
||||||
|
#riftWidget{
|
||||||
|
float:left;
|
||||||
|
width:100%;
|
||||||
|
height:100%;
|
||||||
|
position:fixed;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<script>
|
||||||
|
$(document).ready(function(){
|
||||||
|
$('#usage').hide();
|
||||||
|
//give it 10 seconds, then see if we have an oculus
|
||||||
|
setTimeout(function(){
|
||||||
|
if(typeof(vr) != "undefined"){
|
||||||
|
vr.State();
|
||||||
|
if(vr.hmd.present == false){
|
||||||
|
|
||||||
|
/*$('#usage').fadeIn();
|
||||||
|
$('.widgetRift').fadeOut();*/
|
||||||
|
$('#usage').fadeOut();
|
||||||
|
$('.widgetRift').fadeIn();
|
||||||
|
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$('#usage').fadeOut();
|
||||||
|
$('.widgetRift').fadeIn();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
//ok no VR whatsoever.
|
||||||
|
$('#usage').fadeIn();
|
||||||
|
$('.widgetRift').fadeOut();
|
||||||
|
}
|
||||||
|
},5000)
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body onload="prettyPrint();" bgcolor="#000000">
|
||||||
|
<div
|
||||||
|
data-viz-type="plot.xyz"
|
||||||
|
xdata="http://54.201.54.194/data/GRC_JPL_RL05_DPC_OCN_500_200301_201307.nc/lon[]"
|
||||||
|
xmask="[100000002004087730000]"
|
||||||
|
xlabel="lon"
|
||||||
|
ydata="http://54.201.54.194/data/GRC_JPL_RL05_DPC_OCN_500_200301_201307.nc/lat[]"
|
||||||
|
ylabel="lat"
|
||||||
|
zdata="http://ec2-54-201-9-53.us-west-2.compute.amazonaws.com/data1"
|
||||||
|
zlabel="Fly Controls = up,down,left,right"
|
||||||
|
class="widgetRift"
|
||||||
|
colorbar="#ffffe5,#fff7bc,#fee391,#fec44f,#fe9929,#ec7014,#cc4c02,#993404,#662506"
|
||||||
|
format="spherical"
|
||||||
|
rotating="true"
|
||||||
|
id="riftWidget"
|
||||||
|
></div>
|
||||||
|
<div id="usage">
|
||||||
|
<div id="failWhale">
|
||||||
|
<pre>
|
||||||
|
......................................__................................................
|
||||||
|
.............................,-~*`¯lllllll`*~,..........................................
|
||||||
|
.......................,-~*`lllllllllllllllllllllllllll¯`*-,....................................
|
||||||
|
..................,-~*llllllllllllllllllllllllllllllllllllllllllll*-,..................................
|
||||||
|
...............,-*llllllllllllllllllllllllllllllllllllllllllllllllllllll.\.......................... .......
|
||||||
|
.............;*`lllllllllllllllllllllllllll,-~*~-,llllllllllllllllllll\................................
|
||||||
|
..............\lllllllllllllllllllllllllll/.........\;;;;llllllllllll,-`~-,......................... ..
|
||||||
|
...............\lllllllllllllllllllll,-*...........`~-~-,...(.(¯`*,`,..........................
|
||||||
|
................\llllllllllll,-~*.....................)_-\..*`*;..)..........................
|
||||||
|
.................\,-*`¯,*`)............,-~*`~................/.....................
|
||||||
|
..................|/.../.../~,......-~*,-~*`;................/.\..................
|
||||||
|
................./.../.../.../..,-,..*~,.`*~*................*...\.................
|
||||||
|
................|.../.../.../.*`...\...........................)....)¯`~,..................
|
||||||
|
................|./.../..../.......)......,.)`*~-,............/....|..)...`~-,.............
|
||||||
|
..............././.../...,*`-,.....`-,...*`....,---......\..../...../..|.........¯```*~-,,,,
|
||||||
|
...............(..........)`*~-,....`*`.,-~*.,-*......|.../..../.../............\........
|
||||||
|
................*-,.......`*-,...`~,..``.,,,-*..........|.,*...,*...|..............\........
|
||||||
|
...................*,.........`-,...)-,..............,-*`...,-*....(`-,............\.......
|
||||||
|
......................f`-,.........`-,/...*-,___,,-~*....,-*......|...`-,..........\........
|
||||||
|
</pre>
|
||||||
|
</div>
|
||||||
|
In order to use the oculus rift demo, you need:
|
||||||
|
<ul>
|
||||||
|
<li>1. An Oculus Rift</li>
|
||||||
|
<li>2. An Open Source Google Chrome Plugin that you can download and install from github here (<a alt="Required vr.js plugin for oculus rift" href="https://github.com/benvanik/vr.js">https://github.com/benvanik/vr.js</a>)
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
101
viz/templates/index4.html
Normal file
101
viz/templates/index4.html
Normal file
@ -0,0 +1,101 @@
|
|||||||
|
|
||||||
|
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<script src="../js/prettify.min.js"></script>
|
||||||
|
<link rel="stylesheet" href="../css/prettify.min.css" type="text/css" />
|
||||||
|
<link rel="stylesheet" href="../css/sunburst.css" type="text/css" />
|
||||||
|
<script data-main="//cds.jpl.nasa.gov/widgets/plot/1.0/js/main.js" src="//cds.jpl.nasa.gov/widgets/plot/1.0/components/requirejs/require.js"></script>
|
||||||
|
<script src="http://cds.jpl.nasa.gov/libs/jquery/1.9.1/jquery.min.js"></script>
|
||||||
|
|
||||||
|
<link rel="stylesheet" type="text/css" href="../css/style.css" />
|
||||||
|
<style>
|
||||||
|
/*user defined styles. */
|
||||||
|
#riftWidget{
|
||||||
|
float:left;
|
||||||
|
width:100%;
|
||||||
|
height:100%;
|
||||||
|
position:fixed;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<script>
|
||||||
|
$(document).ready(function(){
|
||||||
|
$('#usage').hide();
|
||||||
|
//give it 10 seconds, then see if we have an oculus
|
||||||
|
setTimeout(function(){
|
||||||
|
if(typeof(vr) != "undefined"){
|
||||||
|
vr.State();
|
||||||
|
if(vr.hmd.present == false){
|
||||||
|
|
||||||
|
/*$('#usage').fadeIn();
|
||||||
|
$('.widgetRift').fadeOut();*/
|
||||||
|
$('#usage').fadeOut();
|
||||||
|
$('.widgetRift').fadeIn();
|
||||||
|
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$('#usage').fadeOut();
|
||||||
|
$('.widgetRift').fadeIn();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
//ok no VR whatsoever.
|
||||||
|
$('#usage').fadeIn();
|
||||||
|
$('.widgetRift').fadeOut();
|
||||||
|
}
|
||||||
|
},5000)
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body onload="prettyPrint();" bgcolor="#000000">
|
||||||
|
<div
|
||||||
|
data-viz-type="plot.xyz"
|
||||||
|
xdata="http://54.201.54.194/data/GRC_JPL_RL05_DPC_OCN_500_200301_201307.nc/lon[]"
|
||||||
|
xmask="[100000002004087730000]"
|
||||||
|
xlabel="lon"
|
||||||
|
ydata="http://54.201.54.194/data/GRC_JPL_RL05_DPC_OCN_500_200301_201307.nc/lat[]"
|
||||||
|
ylabel="lat"
|
||||||
|
zdata="http://ec2-54-201-9-53.us-west-2.compute.amazonaws.com/data2"
|
||||||
|
zmask="[32767]"
|
||||||
|
zlabel="Fly Controls = up,down,left,right"
|
||||||
|
class="widgetRift"
|
||||||
|
colorbar="#ffffe5,#fff7bc,#fee391,#fec44f,#fe9929,#ec7014,#cc4c02,#993404,#662506"
|
||||||
|
format="spherical"
|
||||||
|
rotating="true"
|
||||||
|
id="riftWidget"
|
||||||
|
></div>
|
||||||
|
<div id="usage">
|
||||||
|
<div id="failWhale">
|
||||||
|
<pre>
|
||||||
|
......................................__................................................
|
||||||
|
.............................,-~*`¯lllllll`*~,..........................................
|
||||||
|
.......................,-~*`lllllllllllllllllllllllllll¯`*-,....................................
|
||||||
|
..................,-~*llllllllllllllllllllllllllllllllllllllllllll*-,..................................
|
||||||
|
...............,-*llllllllllllllllllllllllllllllllllllllllllllllllllllll.\.......................... .......
|
||||||
|
.............;*`lllllllllllllllllllllllllll,-~*~-,llllllllllllllllllll\................................
|
||||||
|
..............\lllllllllllllllllllllllllll/.........\;;;;llllllllllll,-`~-,......................... ..
|
||||||
|
...............\lllllllllllllllllllll,-*...........`~-~-,...(.(¯`*,`,..........................
|
||||||
|
................\llllllllllll,-~*.....................)_-\..*`*;..)..........................
|
||||||
|
.................\,-*`¯,*`)............,-~*`~................/.....................
|
||||||
|
..................|/.../.../~,......-~*,-~*`;................/.\..................
|
||||||
|
................./.../.../.../..,-,..*~,.`*~*................*...\.................
|
||||||
|
................|.../.../.../.*`...\...........................)....)¯`~,..................
|
||||||
|
................|./.../..../.......)......,.)`*~-,............/....|..)...`~-,.............
|
||||||
|
..............././.../...,*`-,.....`-,...*`....,---......\..../...../..|.........¯```*~-,,,,
|
||||||
|
...............(..........)`*~-,....`*`.,-~*.,-*......|.../..../.../............\........
|
||||||
|
................*-,.......`*-,...`~,..``.,,,-*..........|.,*...,*...|..............\........
|
||||||
|
...................*,.........`-,...)-,..............,-*`...,-*....(`-,............\.......
|
||||||
|
......................f`-,.........`-,/...*-,___,,-~*....,-*......|...`-,..........\........
|
||||||
|
</pre>
|
||||||
|
</div>
|
||||||
|
In order to use the oculus rift demo, you need:
|
||||||
|
<ul>
|
||||||
|
<li>1. An Oculus Rift</li>
|
||||||
|
<li>2. An Open Source Google Chrome Plugin that you can download and install from github here (<a alt="Required vr.js plugin for oculus rift" href="https://github.com/benvanik/vr.js">https://github.com/benvanik/vr.js</a>)
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
30
viz/views.py
30
viz/views.py
@ -1,6 +1,32 @@
|
|||||||
from django.shortcuts import render
|
from django.shortcuts import render
|
||||||
|
|
||||||
|
|
||||||
def index(request):
|
def index1(request):
|
||||||
context = {}
|
context = {}
|
||||||
return render(request, 'index.html', context)
|
return render(request, 'index1.html', context)
|
||||||
|
|
||||||
|
def index2(request):
|
||||||
|
context = {}
|
||||||
|
return render(request, 'index2.html', context)
|
||||||
|
|
||||||
|
def index3(request):
|
||||||
|
context = {}
|
||||||
|
return render(request, 'index3.html', context)
|
||||||
|
|
||||||
|
def index4(request):
|
||||||
|
context = {}
|
||||||
|
return render(request, 'index4.html', context)
|
||||||
|
|
||||||
|
def data1(request):
|
||||||
|
context = {}
|
||||||
|
if "callback" in request.GET:
|
||||||
|
context["jquery"]=request.GET["callback"]
|
||||||
|
print context
|
||||||
|
return render(request, 'data1.json', context)
|
||||||
|
|
||||||
|
def data2(request):
|
||||||
|
context = {}
|
||||||
|
if "callback" in request.GET:
|
||||||
|
context["jquery"]=request.GET["callback"]
|
||||||
|
print context
|
||||||
|
return render(request, 'data2.json', context)
|
||||||
|
Reference in New Issue
Block a user