Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
django-rest-framework
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
django-rest-framework
Commits
5802dc0f
Commit
5802dc0f
authored
Dec 07, 2015
by
Luis San Pablo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Initial, fixes #3644
parent
0f85165b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
4 deletions
+14
-4
rest_framework/settings.py
+14
-4
No files found.
rest_framework/settings.py
View file @
5802dc0f
...
...
@@ -135,6 +135,19 @@ IMPORT_STRINGS = (
)
SETTINGS_DOC
=
"http://www.django-rest-framework.org/api-guide/settings/"
# List of settings that have been depreceated
DEPRECEATED_SETTINGS
=
()
# List of settings that have been removed
REMOVED_SETTINGS
=
(
"PAGINATE_BY"
,
"PAGINATE_BY_PARAM"
,
"MAX_PAGINATE_BY"
,
)
def
perform_import
(
val
,
setting_name
):
"""
If the given setting is a string import notation,
...
...
@@ -207,10 +220,7 @@ class APISettings(object):
return
val
def
__check_user_settings
(
self
,
user_settings
):
DEPRECEATED_SETTINGS
=
(
"PAGINATE_BY"
,
"PAGINATE_BY_PARAM"
,
"MAX_PAGINATE_BY"
,)
SETTINGS_DOC
=
"http://www.django-rest-framework.org/api-guide/settings/"
for
setting
in
DEPRECEATED_SETTINGS
:
for
setting
in
REMOVED_SETTINGS
:
if
setting
in
user_settings
:
raise
AttributeError
(
"The '
%
s' setting has been removed. Please refer to '
%
s' for available settings."
%
(
setting
,
SETTINGS_DOC
))
return
user_settings
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment