web/webconfig.py
changeset 7275 bb3bb8104134
parent 7130 5eb622c0c672
child 7380 5ad8b2f951ba
equal deleted inserted replaced
7274:4653a2a5110b 7275:bb3bb8104134
   298         if baseurl and baseurl[-1] != '/':
   298         if baseurl and baseurl[-1] != '/':
   299             baseurl += '/'
   299             baseurl += '/'
   300         if not (self.repairing or self.creating):
   300         if not (self.repairing or self.creating):
   301             self.global_set_option('base-url', baseurl)
   301             self.global_set_option('base-url', baseurl)
   302         httpsurl = self['https-url']
   302         httpsurl = self['https-url']
       
   303         datadir_path = 'data/' if self.debugmode else 'data/%s/' % self.instance_md5_version()
   303         if httpsurl:
   304         if httpsurl:
   304             if httpsurl[-1] != '/':
   305             if httpsurl[-1] != '/':
   305                 httpsurl += '/'
   306                 httpsurl += '/'
   306                 if not self.repairing:
   307                 if not self.repairing:
   307                     self.global_set_option('https-url', httpsurl)
   308                     self.global_set_option('https-url', httpsurl)
   308             if self.debugmode:
   309             self.https_datadir_url = httpsurl + datadir_path
   309                 self.https_datadir_url = httpsurl + 'data/'
   310         self.datadir_url = baseurl + datadir_path
   310             else:
       
   311                 self.https_datadir_url = httpsurl + 'data%s/' % self.instance_md5_version()
       
   312         if self.debugmode:
       
   313             self.datadir_url = baseurl + 'data/'
       
   314         else:
       
   315             self.datadir_url = baseurl + 'data%s/' % self.instance_md5_version()
       
   316 
   311 
   317     def _build_ui_properties(self):
   312     def _build_ui_properties(self):
   318         # self.datadir_url[:-1] to remove trailing /
   313         # self.datadir_url[:-1] to remove trailing /
   319         from cubicweb.web.propertysheet import PropertySheet
   314         from cubicweb.web.propertysheet import PropertySheet
   320         cachedir = join(self.appdatahome, 'uicache')
   315         cachedir = join(self.appdatahome, 'uicache')