mirror of
https://github.com/django/django.git
synced 2025-10-24 14:16:09 +00:00
Renamed RemovedInDjangoXYWarnings for new roadmap.
Forwardport of ae1d663b79
from stable/1.8.x plus more.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import warnings
|
||||
|
||||
from django.conf.urls import include, patterns, url
|
||||
from django.utils.deprecation import RemovedInDjango20Warning
|
||||
from django.utils.deprecation import RemovedInDjango110Warning
|
||||
|
||||
from .namespace_urls import URLObject
|
||||
from .views import view_class_instance
|
||||
@@ -9,9 +9,9 @@ from .views import view_class_instance
|
||||
testobj3 = URLObject('testapp', 'test-ns3')
|
||||
testobj4 = URLObject('testapp', 'test-ns4')
|
||||
|
||||
# test deprecated patterns() function. convert to list of urls() in Django 2.0
|
||||
# test deprecated patterns() function. convert to list of urls() in Django 1.10
|
||||
with warnings.catch_warnings():
|
||||
warnings.filterwarnings('ignore', category=RemovedInDjango20Warning)
|
||||
warnings.filterwarnings('ignore', category=RemovedInDjango110Warning)
|
||||
|
||||
urlpatterns = patterns('urlpatterns_reverse.views',
|
||||
url(r'^normal/$', 'empty_view', name='inc-normal-view'),
|
||||
|
||||
Reference in New Issue
Block a user