Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

more cleanup to settable API_URL

  • Loading branch information...
commit 5717759035eacffa2d760f418779c964cc78d91b 1 parent c1e6076
@JoeGermuska JoeGermuska authored
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) {
Please sign in to comment.
Something went wrong with that request. Please try again.