Shift path segments from :attr:`path` to :attr:`script_name` and vice versa. :param shift: The number of path segments to shift. May be negative to change the shift direction. (default: 1)
(self, shift=1)
| 1854 | return '/' + script_name + '/' if script_name else '/' |
| 1855 | |
| 1856 | def path_shift(self, shift=1): |
| 1857 | """ Shift path segments from :attr:`path` to :attr:`script_name` and |
| 1858 | vice versa. |
| 1859 | |
| 1860 | :param shift: The number of path segments to shift. May be negative |
| 1861 | to change the shift direction. (default: 1) |
| 1862 | """ |
| 1863 | script, path = path_shift(self.environ.get('SCRIPT_NAME', '/'), self.path, shift) |
| 1864 | self['SCRIPT_NAME'], self['PATH_INFO'] = script, path |
| 1865 | |
| 1866 | @property |
| 1867 | def content_length(self): |
no test coverage detected