server/session.py
changeset 2466 c4ccfd38a542
parent 2319 654decb099e3
child 2589 92f2bc945261
child 2613 5e19c2bb370e
equal deleted inserted replaced
2465:cc18a700a2be 2466:c4ccfd38a542
   192 
   192 
   193     def entity_cache(self, eid):
   193     def entity_cache(self, eid):
   194         raise KeyError(eid)
   194         raise KeyError(eid)
   195 
   195 
   196     def base_url(self):
   196     def base_url(self):
   197         return self.repo.config['base-url'] or u''
   197         url = self.repo.config['base-url']
       
   198         if not url:
       
   199             try:
       
   200                 url = self.repo.config.default_base_url()
       
   201             except AttributeError: # default_base_url() might not be available
       
   202                 self.warning('missing base-url definition in server config')
       
   203                 url = u''
       
   204         return url
   198 
   205 
   199     def from_controller(self):
   206     def from_controller(self):
   200         """return the id (string) of the controller issuing the request (no
   207         """return the id (string) of the controller issuing the request (no
   201         sense here, always return 'view')
   208         sense here, always return 'view')
   202         """
   209         """