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
3a4ca88a
Commit
3a4ca88a
authored
Dec 11, 2011
by
Tom Christie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add OPTIONS to auto-documenting API
parent
e2f3153b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
11 deletions
+19
-11
djangorestframework/templates/renderer.html
+19
-11
No files found.
djangorestframework/templates/renderer.html
View file @
3a4ca88a
{% load urlize_quoted_links %}{% load add_query_param %}
<?xml version="1.0" encoding="UTF-8"?>
{% load urlize_quoted_links %}{% load add_query_param %}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html
xmlns=
"http://www.w3.org/1999/xhtml"
>
<html
xmlns=
"http://www.w3.org/1999/xhtml"
>
<head>
<head>
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
</head>
</head>
<body>
<body>
<div
id=
"container"
>
<div
id=
"container"
>
<div
id=
"header"
>
<div
id=
"header"
>
<div
id=
"branding"
>
<div
id=
"branding"
>
<h1
id=
"site-name"
><a
href=
'http://django-rest-framework.org'
>
Django REST framework
</a>
<span
class=
"version"
>
v {{ version }}
</span></h1>
<h1
id=
"site-name"
><a
href=
'http://django-rest-framework.org'
>
Django REST framework
</a>
<span
class=
"version"
>
v {{ version }}
</span></h1>
...
@@ -26,7 +26,7 @@
...
@@ -26,7 +26,7 @@
{% if user.is_active %}Welcome, {{ user }}.{% if logout_url %}
<a
href=
'{{ logout_url }}'
>
Log out
</a>
{% endif %}{% else %}Anonymous {% if login_url %}
<a
href=
'{{ login_url }}'
>
Log in
</a>
{% endif %}{% endif %}
{% if user.is_active %}Welcome, {{ user }}.{% if logout_url %}
<a
href=
'{{ logout_url }}'
>
Log out
</a>
{% endif %}{% else %}Anonymous {% if login_url %}
<a
href=
'{{ login_url }}'
>
Log in
</a>
{% endif %}{% endif %}
</div>
</div>
</div>
</div>
<div
class=
"breadcrumbs"
>
<div
class=
"breadcrumbs"
>
{% for breadcrumb_name, breadcrumb_url in breadcrumblist %}
{% for breadcrumb_name, breadcrumb_url in breadcrumblist %}
<a
href=
"{{breadcrumb_url}}"
>
{{breadcrumb_name}}
</a>
{% if not forloop.last %}
›
{% endif %}
<a
href=
"{{breadcrumb_url}}"
>
{{breadcrumb_name}}
</a>
{% if not forloop.last %}
›
{% endif %}
...
@@ -35,6 +35,14 @@
...
@@ -35,6 +35,14 @@
<div
id=
"content"
class=
"{% block coltype %}colM{% endblock %}"
>
<div
id=
"content"
class=
"{% block coltype %}colM{% endblock %}"
>
{% if 'OPTIONS' in view.allowed_methods %}
<form
action=
"{{ request.get_full_path }}"
method=
"post"
>
{% csrf_token %}
<input
type=
"hidden"
name=
"{{ METHOD_PARAM }}"
value=
"OPTIONS"
/>
<input
type=
"submit"
value=
"OPTIONS"
class=
"default"
/>
</form>
{% endif %}
<div
class=
'content-main'
>
<div
class=
'content-main'
>
<h1>
{{ name }}
</h1>
<h1>
{{ name }}
</h1>
<p>
{% if markeddown %}{% autoescape off %}{{ markeddown }}{% endautoescape %}{% else %}{{ description|linebreaksbr }}{% endif %}
</p>
<p>
{% if markeddown %}{% autoescape off %}{{ markeddown }}{% endautoescape %}{% else %}{{ description|linebreaksbr }}{% endif %}
</p>
...
@@ -59,8 +67,8 @@
...
@@ -59,8 +67,8 @@
</fieldset>
</fieldset>
</form>
</form>
{% endif %}
{% endif %}
{# Only display the POST/PUT/DELETE forms if method tunneling via POST forms is enabled and the user has permissions on this view. #}
{# Only display the POST/PUT/DELETE forms if method tunneling via POST forms is enabled and the user has permissions on this view. #}
{% if METHOD_PARAM and response.status != 403 %}
{% if METHOD_PARAM and response.status != 403 %}
{% if 'POST' in view.allowed_methods %}
{% if 'POST' in view.allowed_methods %}
...
@@ -83,7 +91,7 @@
...
@@ -83,7 +91,7 @@
</fieldset>
</fieldset>
</form>
</form>
{% endif %}
{% endif %}
{% if 'PUT' in view.allowed_methods %}
{% if 'PUT' in view.allowed_methods %}
<form
action=
"{{ request.get_full_path }}"
method=
"post"
{%
if
put_form
.
is_multipart
%}
enctype=
"multipart/form-data"
{%
endif
%}
>
<form
action=
"{{ request.get_full_path }}"
method=
"post"
{%
if
put_form
.
is_multipart
%}
enctype=
"multipart/form-data"
{%
endif
%}
>
<fieldset
class=
'module aligned'
>
<fieldset
class=
'module aligned'
>
...
@@ -96,23 +104,23 @@
...
@@ -96,23 +104,23 @@
{{ field.label_tag }}
{{ field.label_tag }}
{{ field }}
{{ field }}
<span
class=
'help'
>
{{ field.help_text }}
</span>
<span
class=
'help'
>
{{ field.help_text }}
</span>
{{ field.errors }}
{{ field.errors }}
</div>
</div>
{% endfor %}
{% endfor %}
<div
class=
'submit-row'
style=
'margin: 0; border: 0'
>
<div
class=
'submit-row'
style=
'margin: 0; border: 0'
>
<input
type=
"submit"
value=
"PUT"
class=
"default"
/>
<input
type=
"submit"
value=
"PUT"
class=
"default"
/>
</div>
</div>
</fieldset>
</fieldset>
</form>
</form>
{% endif %}
{% endif %}
{% if 'DELETE' in view.allowed_methods %}
{% if 'DELETE' in view.allowed_methods %}
<form
action=
"{{ request.get_full_path }}"
method=
"post"
>
<form
action=
"{{ request.get_full_path }}"
method=
"post"
>
<fieldset
class=
'module aligned'
>
<fieldset
class=
'module aligned'
>
<h2>
DELETE {{ name }}
</h2>
<h2>
DELETE {{ name }}
</h2>
{% csrf_token %}
{% csrf_token %}
<input
type=
"hidden"
name=
"{{ METHOD_PARAM }}"
value=
"DELETE"
/>
<input
type=
"hidden"
name=
"{{ METHOD_PARAM }}"
value=
"DELETE"
/>
<div
class=
'submit-row'
style=
'margin: 0; border: 0'
>
<div
class=
'submit-row'
style=
'margin: 0; border: 0'
>
<input
type=
"submit"
value=
"DELETE"
class=
"default"
/>
<input
type=
"submit"
value=
"DELETE"
class=
"default"
/>
</div>
</div>
</fieldset>
</fieldset>
...
...
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