web/request.py
changeset 2476 1294a6bdf3bf
parent 2315 a1849f3ef4af
child 2552 1ea2f2ff5dca
equal deleted inserted replaced
2475:b6753521129d 2476:1294a6bdf3bf
   513     def url(self, includeparams=True):
   513     def url(self, includeparams=True):
   514         """return currently accessed url"""
   514         """return currently accessed url"""
   515         return self.base_url() + self.relative_path(includeparams)
   515         return self.base_url() + self.relative_path(includeparams)
   516 
   516 
   517     def _datadir_url(self):
   517     def _datadir_url(self):
   518         """return url of the application's data directory"""
   518         """return url of the instance's data directory"""
   519         return self.base_url() + 'data%s/' % self.vreg.config.instance_md5_version()
   519         return self.base_url() + 'data%s/' % self.vreg.config.instance_md5_version()
   520 
   520 
   521     def selected(self, url):
   521     def selected(self, url):
   522         """return True if the url is equivalent to currently accessed url"""
   522         """return True if the url is equivalent to currently accessed url"""
   523         reqpath = self.relative_path().lower()
   523         reqpath = self.relative_path().lower()
   585         """
   585         """
   586         raise NotImplementedError()
   586         raise NotImplementedError()
   587 
   587 
   588     def relative_path(self, includeparams=True):
   588     def relative_path(self, includeparams=True):
   589         """return the normalized path of the request (ie at least relative
   589         """return the normalized path of the request (ie at least relative
   590         to the application's root, but some other normalization may be needed
   590         to the instance's root, but some other normalization may be needed
   591         so that the returned path may be used to compare to generated urls
   591         so that the returned path may be used to compare to generated urls
   592 
   592 
   593         :param includeparams:
   593         :param includeparams:
   594            boolean indicating if GET form parameters should be kept in the path
   594            boolean indicating if GET form parameters should be kept in the path
   595         """
   595         """