| 513 | == Change to APPEND_SLASH behaviour == |
| 514 | |
| 515 | Prior to [6852], if a URL didn't end in a slash or have a period in the final component of it's path, and {{{APPEND_SLASH}}} was True, Django would redirect to the same URL, but with a slash appended to the end. |
| 516 | |
| 517 | Now (from [6852] onwards), Django checks to see if the pattern without the trailing slash would be matched by something in your URL patterns. If so, no redirection takes place, because it is assumed you deliberately wanted to catch that pattern. |
| 518 | |
| 519 | For most people, this won't require any changes. Some people, though, have URL patterns that look like this: |
| 520 | {{{ |
| 521 | #!python |
| 522 | r'/some_prefix/(.*)$' |
| 523 | }}} |
| 524 | Previously, those patterns would have been redirected to have a trailing slash. If you always want a slash on such URLs, rewrite the pattern as |
| 525 | {{{ |
| 526 | #!python |
| 527 | r'/some_prefix/(.*/)$' |
| 528 | }}} |
| 529 | Now {{{/some_prefix/foo}}} will not match the pattern and will be redirected to {{{/some_prefix/foo/}}}, which will match. Your view function will be passed {{{foo/}}}, just as it was prior to [6852]. |
| 530 | |