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
fe262ef3
Commit
fe262ef3
authored
Jul 12, 2012
by
Max Arnold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
patch View.head() only for django < 1.4
parent
36686cad
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
djangorestframework/compat.py
+5
-4
No files found.
djangorestframework/compat.py
View file @
fe262ef3
...
@@ -65,13 +65,14 @@ except ImportError:
...
@@ -65,13 +65,14 @@ except ImportError:
environ
.
update
(
request
)
environ
.
update
(
request
)
return
WSGIRequest
(
environ
)
return
WSGIRequest
(
environ
)
# django.views.generic.View (
Django >= 1.3
)
# django.views.generic.View (
1.3 <= Django < 1.4
)
try
:
try
:
from
django.views.generic
import
View
from
django.views.generic
import
View
from
django.utils.decorators
import
classonlymethod
from
django.utils.functional
import
update_wrapper
if
not
hasattr
(
View
,
'head'
):
if
django
.
VERSION
<
(
1
,
4
):
from
django.utils.decorators
import
classonlymethod
from
django.utils.functional
import
update_wrapper
# First implementation of Django class-based views did not include head method
# First implementation of Django class-based views did not include head method
# in base View class - https://code.djangoproject.com/ticket/15668
# in base View class - https://code.djangoproject.com/ticket/15668
class
ViewPlusHead
(
View
):
class
ViewPlusHead
(
View
):
...
...
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