Changeset 735
- Timestamp:
- 06/17/08 21:00:43 (5 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
sandbox/camptocamp/MapFishUnhcr/server/python/mapfish/controllers/printer.py
r731 r735 115 115 self.start_response('200 OK', [ 116 116 ('Content-Type','application/json; charset=utf-8')]) 117 baseURL = "http://" + request.host117 baseURL = self._getBaseURL() 118 118 return simplejson.dumps({ 119 119 'getURL': baseURL + url_for(action = "get", id = curId) … … 147 147 self.url = None 148 148 149 def _getBaseURL(self): 150 if self.url: 151 return self.url 152 else: 153 return "http://" + request.host 154 155 149 156 def _addURLs(self, json): 150 157 expr = re.compile('}$') 151 if self.url: 152 baseURL = self.url 153 else: 154 baseURL = "http://" + request.host 158 baseURL = self._getBaseURL() 155 159 printURL = simplejson.dumps(baseURL + url_for(action = "doPrint")) 156 160 createURL = simplejson.dumps(baseURL + url_for(action = "create"))
