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
7c4d50f6
Commit
7c4d50f6
authored
Oct 09, 2012
by
Tom Christie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix browseable API form display error for authenticated permissions
parent
e9475d03
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
2 deletions
+7
-2
docs/index.md
+2
-1
rest_framework/request.py
+4
-0
rest_framework/templates/rest_framework/base.html
+1
-1
No files found.
docs/index.md
View file @
7c4d50f6
...
...
@@ -54,7 +54,7 @@ If you're intending to use the browserable API you'll want to add REST framework
url(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework'))
)
Note that the
base URL
can be whatever you want, but you must include
`rest_framework.urls`
with the
`rest_framework`
namespace.
Note that the
URL path
can be whatever you want, but you must include
`rest_framework.urls`
with the
`rest_framework`
namespace.
## Quickstart
...
...
@@ -119,6 +119,7 @@ Run the tests:
./rest_framework/runtests/runtests.py
For more information see the
[
Contributing to REST framework
][
contributing
]
section.
## Support
For support please see the
[
REST framework discussion group
][
group
]
, or try the
`#restframework`
channel on
`irc.freenode.net`
.
...
...
rest_framework/request.py
View file @
7c4d50f6
...
...
@@ -41,6 +41,10 @@ def clone_request(request, method):
ret
.
_content_type
=
request
.
_content_type
ret
.
_stream
=
request
.
_stream
ret
.
_method
=
method
if
hasattr
(
request
,
'_user'
):
ret
.
_user
=
request
.
_user
if
hasattr
(
request
,
'_auth'
):
ret
.
_auth
=
request
.
_auth
return
ret
...
...
rest_framework/templates/rest_framework/base.html
View file @
7c4d50f6
...
...
@@ -95,7 +95,7 @@
<form
class=
"button-form"
action=
"{{ request.get_full_path }}"
method=
"POST"
class=
"pull-right"
>
{% csrf_token %}
<input
type=
"hidden"
name=
"{{ api_settings.FORM_METHOD_OVERRIDE }}"
value=
"OPTIONS"
/>
<button
class=
"btn btn-
info
js-tooltip"
title=
"Make an OPTIONS request on the {{ name }} resource"
>
OPTIONS
</button>
<button
class=
"btn btn-
primary
js-tooltip"
title=
"Make an OPTIONS request on the {{ name }} resource"
>
OPTIONS
</button>
</form>
{% endif %}
...
...
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