summaryrefslogtreecommitdiff
path: root/docs/ref
diff options
context:
space:
mode:
authorAdam Chainz <me@adamj.eu>2016-12-23 00:16:26 +0000
committerTim Graham <timograham@gmail.com>2016-12-22 19:16:26 -0500
commit0a9bd266ff8e042f53e25928527a29ce896b4955 (patch)
treeb508486bb26dfba491c4a9a8f6ef92f0a4a5b1b1 /docs/ref
parent8fb82a315a2a2827c5b91ce1190f2d6f0c8d977b (diff)
Documented url()'s 'regex' parameter.
Diffstat (limited to 'docs/ref')
-rw-r--r--docs/ref/urls.txt7
1 files changed, 7 insertions, 0 deletions
diff --git a/docs/ref/urls.txt b/docs/ref/urls.txt
index 37df9a30cf..d1464da66d 100644
--- a/docs/ref/urls.txt
+++ b/docs/ref/urls.txt
@@ -33,6 +33,13 @@ Helper function to return a URL pattern for serving files in debug mode::
...
]
+The ``regex`` parameter should be a string or
+:func:`~django.utils.translation.ugettext_lazy()` (see
+:ref:`translating-urlpatterns`) that contains a regular expression compatible
+with Python's :py:mod:`re` module. Strings typically use raw string syntax
+(``r''``) so that they can contain sequences like ``\d`` without the need to
+escape the backslash with another backslash.
+
The ``view`` parameter is a view function or the result of
:meth:`~django.views.generic.base.View.as_view` for class-based views. It can
also be an :func:`include`.