summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
Diffstat (limited to 'django')
-rw-r--r--django/conf/urls/__init__.py8
-rw-r--r--django/views/i18n.py4
2 files changed, 10 insertions, 2 deletions
diff --git a/django/conf/urls/__init__.py b/django/conf/urls/__init__.py
index 7bda34516b..311cd70b84 100644
--- a/django/conf/urls/__init__.py
+++ b/django/conf/urls/__init__.py
@@ -1,4 +1,7 @@
+import warnings
+
from django.urls import include, re_path
+from django.utils.deprecation import RemovedInDjango40Warning
from django.views import defaults
__all__ = ['handler400', 'handler403', 'handler404', 'handler500', 'include', 'url']
@@ -10,4 +13,9 @@ handler500 = defaults.server_error
def url(regex, view, kwargs=None, name=None):
+ warnings.warn(
+ 'django.conf.urls.url() is deprecated in favor of '
+ 'django.urls.re_path().',
+ RemovedInDjango40Warning,
+ )
return re_path(regex, view, kwargs, name)
diff --git a/django/views/i18n.py b/django/views/i18n.py
index 23656a24db..9644565f46 100644
--- a/django/views/i18n.py
+++ b/django/views/i18n.py
@@ -196,8 +196,8 @@ class JavaScriptCatalog(View):
Return the selected language catalog as a JavaScript library.
Receive the list of packages to check for translations in the `packages`
- kwarg either from the extra dictionary passed to the url() function or as a
- plus-sign delimited string from the request. Default is 'django.conf'.
+ kwarg either from the extra dictionary passed to the path() function or as
+ a plus-sign delimited string from the request. Default is 'django.conf'.
You can override the gettext domain for this view, but usually you don't
want to do that as JavaScript messages go to the djangojs domain. This