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
bbe0df29
Commit
bbe0df29
authored
Apr 07, 2017
by
Tom Christie
Committed by
GitHub
Apr 07, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #5053 from s-m-b/patch-1
Pass initkwargs stored on view to instance
parents
95df4898
f1ca71ce
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletions
+2
-1
rest_framework/utils/breadcrumbs.py
+2
-1
No files found.
rest_framework/utils/breadcrumbs.py
View file @
bbe0df29
...
...
@@ -24,11 +24,12 @@ def get_breadcrumbs(url, request=None):
# Check if this is a REST framework view,
# and if so add it to the breadcrumbs
cls
=
getattr
(
view
,
'cls'
,
None
)
initkwargs
=
getattr
(
view
,
'initkwargs'
,
{})
if
cls
is
not
None
and
issubclass
(
cls
,
APIView
):
# Don't list the same view twice in a row.
# Probably an optional trailing slash.
if
not
seen
or
seen
[
-
1
]
!=
view
:
c
=
cls
()
c
=
cls
(
**
initkwargs
)
c
.
suffix
=
getattr
(
view
,
'suffix'
,
None
)
name
=
c
.
get_view_name
()
insert_url
=
preserve_builtin_query_params
(
prefix
+
url
,
request
)
...
...
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