2020-05-05 02:33:35 +08:00
|
|
|
import warnings
|
|
|
|
|
2016-10-21 01:29:04 +08:00
|
|
|
from django.urls import include, re_path
|
2020-05-05 02:33:35 +08:00
|
|
|
from django.utils.deprecation import RemovedInDjango40Warning
|
2017-01-28 05:13:40 +08:00
|
|
|
from django.views import defaults
|
2011-09-12 06:36:16 +08:00
|
|
|
|
2015-08-17 22:45:00 +08:00
|
|
|
__all__ = ['handler400', 'handler403', 'handler404', 'handler500', 'include', 'url']
|
2011-09-12 06:36:16 +08:00
|
|
|
|
2017-01-28 05:13:40 +08:00
|
|
|
handler400 = defaults.bad_request
|
|
|
|
handler403 = defaults.permission_denied
|
|
|
|
handler404 = defaults.page_not_found
|
|
|
|
handler500 = defaults.server_error
|
2011-09-12 06:36:16 +08:00
|
|
|
|
2013-10-31 23:42:28 +08:00
|
|
|
|
2015-08-17 23:07:03 +08:00
|
|
|
def url(regex, view, kwargs=None, name=None):
|
2020-05-05 02:33:35 +08:00
|
|
|
warnings.warn(
|
|
|
|
'django.conf.urls.url() is deprecated in favor of '
|
|
|
|
'django.urls.re_path().',
|
|
|
|
RemovedInDjango40Warning,
|
|
|
|
)
|
2016-10-21 01:29:04 +08:00
|
|
|
return re_path(regex, view, kwargs, name)
|