Skip to content

Commit 907d6ab

Browse files
committed
Remove include compat
1 parent a65f141 commit 907d6ab

File tree

2 files changed

+3
-13
lines changed

2 files changed

+3
-13
lines changed

rest_framework/compat.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -305,15 +305,6 @@ def set_rollback():
305305
pass
306306

307307

308-
# TODO: Remove
309-
def include(module, namespace=None, app_name=None):
310-
from django.conf.urls import include
311-
if django.VERSION < (1,9):
312-
return include(module, namespace, app_name)
313-
else:
314-
return include((module, app_name), namespace)
315-
316-
317308
def authenticate(request=None, **credentials):
318309
from django.contrib.auth import authenticate
319310
if django.VERSION < (1, 11):

rest_framework/urlpatterns.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
from __future__ import unicode_literals
22

3-
from django.conf.urls import url
3+
from django.conf.urls import include, url
44

5-
from rest_framework.compat import RegexURLResolver, include
5+
from rest_framework.compat import RegexURLResolver
66
from rest_framework.settings import api_settings
77

88

@@ -19,8 +19,7 @@ def apply_suffix_patterns(urlpatterns, suffix_pattern, suffix_required):
1919
patterns = apply_suffix_patterns(urlpattern.url_patterns,
2020
suffix_pattern,
2121
suffix_required)
22-
ret.append(url(regex, include(patterns, namespace, app_name), kwargs))
23-
22+
ret.append(url(regex, include((patterns, app_name), namespace), kwargs))
2423
else:
2524
# Regular URL pattern
2625
regex = urlpattern.regex.pattern.rstrip('$').rstrip('/') + suffix_pattern

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy