319 if baseurl and baseurl[-1] != '/': |
319 if baseurl and baseurl[-1] != '/': |
320 baseurl += '/' |
320 baseurl += '/' |
321 if not (self.repairing or self.creating): |
321 if not (self.repairing or self.creating): |
322 self.global_set_option('base-url', baseurl) |
322 self.global_set_option('base-url', baseurl) |
323 httpsurl = self['https-url'] |
323 httpsurl = self['https-url'] |
324 if (self.debugmode or self.mode == 'test'): |
324 data_relpath = self.data_relpath() |
325 datadir_path = 'data/' |
|
326 else: |
|
327 datadir_path = 'data/%s/' % self.instance_md5_version() |
|
328 if httpsurl: |
325 if httpsurl: |
329 if httpsurl[-1] != '/': |
326 if httpsurl[-1] != '/': |
330 httpsurl += '/' |
327 httpsurl += '/' |
331 if not self.repairing: |
328 if not self.repairing: |
332 self.global_set_option('https-url', httpsurl) |
329 self.global_set_option('https-url', httpsurl) |
333 self.https_datadir_url = httpsurl + datadir_path |
330 self.https_datadir_url = httpsurl + data_relpath |
334 self.datadir_url = baseurl + datadir_path |
331 self.datadir_url = baseurl + data_relpath |
|
332 |
|
333 def data_relpath(self): |
|
334 if (self.debugmode or self.mode == 'test'): |
|
335 return 'data/' |
|
336 else: |
|
337 return 'data/%s/' % self.instance_md5_version() |
335 |
338 |
336 def _build_ui_properties(self): |
339 def _build_ui_properties(self): |
337 # self.datadir_url[:-1] to remove trailing / |
340 # self.datadir_url[:-1] to remove trailing / |
338 from cubicweb.web.propertysheet import PropertySheet |
341 from cubicweb.web.propertysheet import PropertySheet |
339 cachedir = join(self.appdatahome, 'uicache') |
342 cachedir = join(self.appdatahome, 'uicache') |