Skip to content
Browse files

more cleanup to settable API_URL

  • Loading branch information...
1 parent c1e6076 commit 5717759035eacffa2d760f418779c964cc78d91b @JoeGermuska JoeGermuska committed Oct 15, 2011
Showing with 5 additions and 5 deletions.
  1. +1 −1 censusweb/api/templates/base.html
  2. +4 −4 censusweb/media/js/query.js
View
2 censusweb/api/templates/base.html
@@ -18,8 +18,8 @@
<script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<script type="text/javascript">
+ ire_census.API_URL = "{{ settings.API_URL }}";
window.DATASET = "{{ settings.DATASET }}";
- window.API_URL = "{{ settings.API_URL }}";
window.DEFAULT_TABLES = "{{ settings.DEFAULT_TABLES|join:',' }}";
</script>
<script type="text/javascript">
View
8 censusweb/media/js/query.js
@@ -237,7 +237,7 @@ $(function(){
},
loadCounties: function() {
- $.ajax(API_URL + "/" + this.get(SUMLEV_STATE) + "/counties.jsonp", {
+ $.ajax(ire_census.API_URL + "/" + this.get(SUMLEV_STATE) + "/counties.jsonp", {
dataType: "jsonp",
jsonpCallback: "counties",
success: _.bind(function(response) {
@@ -248,7 +248,7 @@ $(function(){
},
loadCountySubdivisions: function() {
- $.ajax(API_URL + "/" + this.get(SUMLEV_STATE) + "/county_subdivisions_" + this.get(SUMLEV_COUNTY) + ".jsonp", {
+ $.ajax(ire_census.API_URL + "/" + this.get(SUMLEV_STATE) + "/county_subdivisions_" + this.get(SUMLEV_COUNTY) + ".jsonp", {
dataType: "jsonp",
jsonpCallback: "county_subdivisions_" + this.get(SUMLEV_COUNTY),
success: _.bind(function(response) {
@@ -259,7 +259,7 @@ $(function(){
},
loadPlaces: function() {
- $.ajax(API_URL + "/" + this.get(SUMLEV_STATE) + "/places.jsonp", {
+ $.ajax(ire_census.API_URL + "/" + this.get(SUMLEV_STATE) + "/places.jsonp", {
dataType: "jsonp",
jsonpCallback: "places",
success: _.bind(function(response) {
@@ -270,7 +270,7 @@ $(function(){
},
loadTracts: function() {
- $.ajax(API_URL + "/" + this.get(SUMLEV_STATE) + "/tracts_" + this.get(SUMLEV_COUNTY) + ".jsonp", {
+ $.ajax(ire_census.API_URL + "/" + this.get(SUMLEV_STATE) + "/tracts_" + this.get(SUMLEV_COUNTY) + ".jsonp", {
dataType: "jsonp",
jsonpCallback: "tracts_" + this.get(SUMLEV_COUNTY),
success: _.bind(function(response) {

0 comments on commit 5717759

Please sign in to comment.
Something went wrong with that request. Please try again.