mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-02-02 20:54:42 +03:00
Fix breadcrumb rendering issue
This commit is contained in:
parent
ed2cf180c9
commit
d7c08222f1
|
@ -40,6 +40,12 @@ You can determine your currently installed version using `pip freeze`:
|
||||||
|
|
||||||
## 2.3.x series
|
## 2.3.x series
|
||||||
|
|
||||||
|
### 2.3.1
|
||||||
|
|
||||||
|
**Date**: 7th May 2013
|
||||||
|
|
||||||
|
* Bugfix: Fix breadcrumb rendering issue.
|
||||||
|
|
||||||
### 2.3.0
|
### 2.3.0
|
||||||
|
|
||||||
**Date**: 7th May 2013
|
**Date**: 7th May 2013
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
__version__ = '2.3.0'
|
__version__ = '2.3.1'
|
||||||
|
|
||||||
VERSION = __version__ # synonym
|
VERSION = __version__ # synonym
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,8 @@ def get_breadcrumbs(url):
|
||||||
else:
|
else:
|
||||||
# Check if this is a REST framework view,
|
# Check if this is a REST framework view,
|
||||||
# and if so add it to the breadcrumbs
|
# and if so add it to the breadcrumbs
|
||||||
if issubclass(getattr(view, 'cls', None), APIView):
|
cls = getattr(view, 'cls', None)
|
||||||
|
if cls is not None and issubclass(cls, APIView):
|
||||||
# Don't list the same view twice in a row.
|
# Don't list the same view twice in a row.
|
||||||
# Probably an optional trailing slash.
|
# Probably an optional trailing slash.
|
||||||
if not seen or seen[-1] != view:
|
if not seen or seen[-1] != view:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user