[1.7.x] Fixed #23277 -- Backport patterns() documentation changes.

https://code.djangoproject.com/ticket/23277