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)
| 1293 | return '/' + script_name + '/' if script_name else '/' |
| 1294 | |
| 1295 | def path_shift(self, shift=1): |
| 1296 | ''' Shift path segments from :attr:`path` to :attr:`script_name` and |
| 1297 | vice versa. |
| 1298 | |
| 1299 | :param shift: The number of path segments to shift. May be negative |
| 1300 | to change the shift direction. (default: 1) |
| 1301 | ''' |
| 1302 | script = self.environ.get('SCRIPT_NAME','/') |
| 1303 | self['SCRIPT_NAME'], self['PATH_INFO'] = path_shift(script, self.path, shift) |
| 1304 | |
| 1305 | @property |
| 1306 | def content_length(self): |
no test coverage detected