Skip to content

Commit 5802dc0

Browse files
committed
Initial, fixes #3644
1 parent 0f85165 commit 5802dc0

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

rest_framework/settings.py

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,19 @@
135135
)
136136

137137

138+
SETTINGS_DOC = "http://www.django-rest-framework.org/api-guide/settings/"
139+
140+
141+
# List of settings that have been depreceated
142+
DEPRECEATED_SETTINGS = ()
143+
144+
145+
# List of settings that have been removed
146+
REMOVED_SETTINGS = (
147+
"PAGINATE_BY", "PAGINATE_BY_PARAM", "MAX_PAGINATE_BY",
148+
)
149+
150+
138151
def perform_import(val, setting_name):
139152
"""
140153
If the given setting is a string import notation,
@@ -207,10 +220,7 @@ def __getattr__(self, attr):
207220
return val
208221

209222
def __check_user_settings(self, user_settings):
210-
DEPRECEATED_SETTINGS = (
211-
"PAGINATE_BY", "PAGINATE_BY_PARAM", "MAX_PAGINATE_BY",)
212-
SETTINGS_DOC = "http://www.django-rest-framework.org/api-guide/settings/"
213-
for setting in DEPRECEATED_SETTINGS:
223+
for setting in REMOVED_SETTINGS:
214224
if setting in user_settings:
215225
raise AttributeError("The '%s' setting has been removed. Please refer to '%s' for available settings." % (setting, SETTINGS_DOC))
216226
return user_settings

0 commit comments

Comments
 (0)