mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-02-13 10:00:53 +03:00
Fixed the issue with the non-draggable horizontal scrollbar
This commit is contained in:
parent
e85ef3b479
commit
1e2bd1294e
|
@ -6,30 +6,30 @@ a single block in the template.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
.form-actions {
|
.form-actions {
|
||||||
background: transparent;
|
background: transparent;
|
||||||
border-top-color: transparent;
|
border-top-color: transparent;
|
||||||
padding-top: 0;
|
padding-top: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.navbar-inverse .brand a {
|
.navbar-inverse .brand a {
|
||||||
color: #999;
|
color: #999999;
|
||||||
}
|
}
|
||||||
.navbar-inverse .brand:hover a {
|
.navbar-inverse .brand:hover a {
|
||||||
color: white;
|
color: white;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* custom navigation styles */
|
/* custom navigation styles */
|
||||||
.wrapper .navbar{
|
.navbar {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
position: absolute;
|
position: fixed;
|
||||||
left: 0;
|
left: 0;
|
||||||
top: 0;
|
top: 0;
|
||||||
|
z-index: 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
.navbar .navbar-inner{
|
.navbar .navbar-inner {
|
||||||
background: #2C2C2C;
|
background: #2C2C2C;
|
||||||
color: white;
|
color: white;
|
||||||
border: none;
|
border: none;
|
||||||
|
@ -37,7 +37,7 @@ a single block in the template.
|
||||||
border-radius: 0px;
|
border-radius: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.navbar .navbar-inner .nav li, .navbar .navbar-inner .nav li a, .navbar .navbar-inner .brand:hover{
|
.navbar .navbar-inner .nav li, .navbar .navbar-inner .nav li a, .navbar .navbar-inner .brand:hover {
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,17 +45,18 @@ a single block in the template.
|
||||||
background: #2c2c2c;
|
background: #2c2c2c;
|
||||||
}
|
}
|
||||||
|
|
||||||
.navbar .navbar-inner .dropdown-menu li a, .navbar .navbar-inner .dropdown-menu li{
|
.navbar .navbar-inner .dropdown-menu li a, .navbar .navbar-inner .dropdown-menu li {
|
||||||
color: #A30000;
|
color: #A30000;
|
||||||
}
|
}
|
||||||
.navbar .navbar-inner .dropdown-menu li a:hover{
|
|
||||||
|
.navbar .navbar-inner .dropdown-menu li a:hover {
|
||||||
background: #eeeeee;
|
background: #eeeeee;
|
||||||
color: #c20000;
|
color: #c20000;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*=== dabapps bootstrap styles ====*/
|
/*=== dabapps bootstrap styles ====*/
|
||||||
|
|
||||||
html{
|
html {
|
||||||
width:100%;
|
width:100%;
|
||||||
background: none;
|
background: none;
|
||||||
}
|
}
|
||||||
|
@ -65,121 +66,127 @@ body, .navbar .navbar-inner .container-fluid {
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
body{
|
body {
|
||||||
background: url("../img/grid.png") repeat-x;
|
background: url("../img/grid.png") repeat-x;
|
||||||
background-attachment: fixed;
|
background-attachment: fixed;
|
||||||
}
|
}
|
||||||
|
|
||||||
#content{
|
#content {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
padding-bottom: 60px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* sticky footer and footer */
|
/* sticky footer and footer */
|
||||||
html, body {
|
html, body {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.wrapper {
|
.wrapper {
|
||||||
|
position: relative;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
padding-top: 60px;
|
||||||
|
margin: -60px 0;
|
||||||
min-height: 100%;
|
min-height: 100%;
|
||||||
height: auto !important;
|
|
||||||
height: 100%;
|
|
||||||
margin: 0 auto -60px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.form-switcher {
|
.form-switcher {
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.well {
|
.well {
|
||||||
-webkit-box-shadow: none;
|
-webkit-box-shadow: none;
|
||||||
-moz-box-shadow: none;
|
-moz-box-shadow: none;
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.well .form-actions {
|
.well .form-actions {
|
||||||
padding-bottom: 0;
|
padding-bottom: 0;
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.well form {
|
.well form {
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.well form .help-block {
|
.well form .help-block {
|
||||||
color: #999;
|
color: #999999;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav-tabs {
|
.nav-tabs {
|
||||||
border: 0;
|
border: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav-tabs > li {
|
.nav-tabs > li {
|
||||||
float: right;
|
float: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav-tabs li a {
|
.nav-tabs li a {
|
||||||
margin-right: 0;
|
margin-right: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav-tabs > .active > a {
|
.nav-tabs > .active > a {
|
||||||
background: #f5f5f5;
|
background: #F5F5F5;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav-tabs > .active > a:hover {
|
.nav-tabs > .active > a:hover {
|
||||||
background: #f5f5f5;
|
background: #F5F5F5;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tabbable.first-tab-active .tab-content
|
.tabbable.first-tab-active .tab-content {
|
||||||
{
|
border-top-right-radius: 0;
|
||||||
border-top-right-radius: 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#footer, #push {
|
footer {
|
||||||
height: 60px; /* .push must be the same height as .footer */
|
position: absolute;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
clear: both;
|
||||||
|
z-index: 10;
|
||||||
|
height: 60px;
|
||||||
|
width: 95%;
|
||||||
|
margin: 0 2.5%;
|
||||||
}
|
}
|
||||||
|
|
||||||
#footer{
|
footer p {
|
||||||
text-align: right;
|
|
||||||
}
|
|
||||||
|
|
||||||
#footer p {
|
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: gray;
|
color: gray;
|
||||||
border-top: 1px solid #DDD;
|
border-top: 1px solid #DDD;
|
||||||
padding-top: 10px;
|
padding-top: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#footer a {
|
footer a {
|
||||||
color: gray;
|
color: gray !important;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
#footer a:hover {
|
footer a:hover {
|
||||||
color: gray;
|
color: gray;
|
||||||
}
|
}
|
||||||
|
|
||||||
.page-header {
|
.page-header {
|
||||||
border-bottom: none;
|
border-bottom: none;
|
||||||
padding-bottom: 0px;
|
padding-bottom: 0px;
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* custom general page styles */
|
/* custom general page styles */
|
||||||
.hero-unit h2, .hero-unit h1{
|
.hero-unit h1, .hero-unit h2 {
|
||||||
color: #A30000;
|
color: #A30000;
|
||||||
}
|
}
|
||||||
|
|
||||||
body a, body a{
|
body a {
|
||||||
color: #A30000;
|
color: #A30000;
|
||||||
}
|
}
|
||||||
|
|
||||||
body a:hover{
|
body a:hover {
|
||||||
color: #c20000;
|
color: #c20000;
|
||||||
}
|
}
|
||||||
|
|
||||||
#content a span{
|
#content a span {
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
|
|
||||||
.request-info {
|
.request-info {
|
||||||
clear:both;
|
clear:both;
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,20 +3,20 @@
|
||||||
content running up underneath it. */
|
content running up underneath it. */
|
||||||
|
|
||||||
h1 {
|
h1 {
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
|
|
||||||
h2, h3 {
|
h2, h3 {
|
||||||
font-weight: 300;
|
font-weight: 300;
|
||||||
}
|
}
|
||||||
|
|
||||||
.resource-description, .response-info {
|
.resource-description, .response-info {
|
||||||
margin-bottom: 2em;
|
margin-bottom: 2em;
|
||||||
}
|
}
|
||||||
.version:before {
|
.version:before {
|
||||||
content: "v";
|
content: "v";
|
||||||
opacity: 0.6;
|
opacity: 0.6;
|
||||||
padding-right: 0.25em;
|
padding-right: 0.25em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.version {
|
.version {
|
||||||
|
@ -24,16 +24,16 @@ h2, h3 {
|
||||||
}
|
}
|
||||||
|
|
||||||
.format-option {
|
.format-option {
|
||||||
font-family: Menlo, Consolas, "Andale Mono", "Lucida Console", monospace;
|
font-family: Menlo, Consolas, "Andale Mono", "Lucida Console", monospace;
|
||||||
}
|
}
|
||||||
|
|
||||||
.button-form {
|
.button-form {
|
||||||
float: right;
|
float: right;
|
||||||
margin-right: 1em;
|
margin-right: 1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
ul.breadcrumb {
|
ul.breadcrumb {
|
||||||
margin: 58px 0 0 0;
|
margin: 80px 0 0 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
form select, form input, form textarea {
|
form select, form input, form textarea {
|
||||||
|
@ -43,17 +43,18 @@ form select, form input, form textarea {
|
||||||
form select[multiple] {
|
form select[multiple] {
|
||||||
height: 150px;
|
height: 150px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* To allow tooltips to work on disabled elements */
|
/* To allow tooltips to work on disabled elements */
|
||||||
.disabled-tooltip-shield {
|
.disabled-tooltip-shield {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.errorlist {
|
.errorlist {
|
||||||
margin-top: 0.5em;
|
margin-top: 0.5em;
|
||||||
}
|
}
|
||||||
|
|
||||||
pre {
|
pre {
|
||||||
|
@ -64,8 +65,7 @@ pre {
|
||||||
}
|
}
|
||||||
|
|
||||||
.page-header {
|
.page-header {
|
||||||
border-bottom: none;
|
border-bottom: none;
|
||||||
padding-bottom: 0px;
|
padding-bottom: 0px;
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,231 +3,277 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
{% block head %}
|
{% block head %}
|
||||||
|
|
||||||
|
{% block meta %}
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||||
|
<meta name="robots" content="NONE,NOARCHIVE" />
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
<title>{% block title %}Django REST framework{% endblock %}</title>
|
||||||
|
|
||||||
|
{% block style %}
|
||||||
|
{% block bootstrap_theme %}
|
||||||
|
<link rel="stylesheet" type="text/css" href="{% static "rest_framework/css/bootstrap.min.css" %}"/>
|
||||||
|
<link rel="stylesheet" type="text/css" href="{% static "rest_framework/css/bootstrap-tweaks.css" %}"/>
|
||||||
|
{% endblock %}
|
||||||
|
<link rel="stylesheet" type="text/css" href="{% static "rest_framework/css/prettify.css" %}"/>
|
||||||
|
<link rel="stylesheet" type="text/css" href="{% static "rest_framework/css/default.css" %}"/>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
{% block meta %}
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
|
||||||
<meta name="robots" content="NONE,NOARCHIVE" />
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
<title>{% block title %}Django REST framework{% endblock %}</title>
|
|
||||||
|
|
||||||
{% block style %}
|
|
||||||
{% block bootstrap_theme %}
|
|
||||||
<link rel="stylesheet" type="text/css" href="{% static "rest_framework/css/bootstrap.min.css" %}"/>
|
|
||||||
<link rel="stylesheet" type="text/css" href="{% static "rest_framework/css/bootstrap-tweaks.css" %}"/>
|
|
||||||
{% endblock %}
|
|
||||||
<link rel="stylesheet" type="text/css" href="{% static "rest_framework/css/prettify.css" %}"/>
|
|
||||||
<link rel="stylesheet" type="text/css" href="{% static "rest_framework/css/default.css" %}"/>
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% endblock %}
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body class="{% block bodyclass %}{% endblock %} container">
|
<body class="{% block bodyclass %}{% endblock %} container">
|
||||||
|
|
||||||
<div class="wrapper">
|
<div class="wrapper">
|
||||||
|
|
||||||
{% block navbar %}
|
{% block navbar %}
|
||||||
<div class="navbar {% block bootstrap_navbar_variant %}navbar-inverse{% endblock %}">
|
<div class="navbar {% block bootstrap_navbar_variant %}navbar-inverse{% endblock %}">
|
||||||
<div class="navbar-inner">
|
<div class="navbar-inner">
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<span href="/">
|
<span href="/">
|
||||||
{% block branding %}<a class='brand' rel="nofollow" href='http://www.django-rest-framework.org'>Django REST framework <span class="version">{{ version }}</span></a>{% endblock %}
|
{% block branding %}
|
||||||
</span>
|
<a class='brand' rel="nofollow" href='http://www.django-rest-framework.org'>
|
||||||
<ul class="nav pull-right">
|
Django REST framework <span class="version">{{ version }}</span>
|
||||||
{% block userlinks %}
|
</a>
|
||||||
{% if user.is_authenticated %}
|
{% endblock %}
|
||||||
<li class="dropdown">
|
</span>
|
||||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
|
<ul class="nav pull-right">
|
||||||
{{ user }}
|
{% block userlinks %}
|
||||||
<b class="caret"></b>
|
{% if user.is_authenticated %}
|
||||||
</a>
|
<li class="dropdown">
|
||||||
<ul class="dropdown-menu">
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
|
||||||
<li>{% optional_logout request %}</li>
|
{{ user }}
|
||||||
</ul>
|
<b class="caret"></b>
|
||||||
</li>
|
</a>
|
||||||
{% else %}
|
<ul class="dropdown-menu">
|
||||||
<li>{% optional_login request %}</li>
|
<li>{% optional_logout request %}</li>
|
||||||
{% endif %}
|
</ul>
|
||||||
{% endblock %}
|
</li>
|
||||||
</ul>
|
{% else %}
|
||||||
</div>
|
<li>{% optional_login request %}</li>
|
||||||
</div>
|
{% endif %}
|
||||||
</div>
|
{% endblock %}
|
||||||
{% endblock %}
|
</ul>
|
||||||
|
</div>
|
||||||
{% block breadcrumbs %}
|
|
||||||
<ul class="breadcrumb">
|
|
||||||
{% for breadcrumb_name, breadcrumb_url in breadcrumblist %}
|
|
||||||
<li>
|
|
||||||
<a href="{{ breadcrumb_url }}" {% if forloop.last %}class="active"{% endif %}>{{ breadcrumb_name }}</a> {% if not forloop.last %}<span class="divider">›</span>{% endif %}
|
|
||||||
</li>
|
|
||||||
{% endfor %}
|
|
||||||
</ul>
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
<!-- Content -->
|
|
||||||
<div id="content">
|
|
||||||
|
|
||||||
{% if 'GET' in allowed_methods %}
|
|
||||||
<form id="get-form" class="pull-right">
|
|
||||||
<fieldset>
|
|
||||||
<div class="btn-group format-selection">
|
|
||||||
<a class="btn btn-primary js-tooltip" href='{{ request.get_full_path }}' rel="nofollow" title="Make a GET request on the {{ name }} resource">GET</a>
|
|
||||||
|
|
||||||
<button class="btn btn-primary dropdown-toggle js-tooltip" data-toggle="dropdown" title="Specify a format for the GET request">
|
|
||||||
<span class="caret"></span>
|
|
||||||
</button>
|
|
||||||
<ul class="dropdown-menu">
|
|
||||||
{% for format in available_formats %}
|
|
||||||
<li>
|
|
||||||
<a class="js-tooltip format-option" href='{% add_query_param request api_settings.URL_FORMAT_OVERRIDE format %}' rel="nofollow" title="Make a GET request on the {{ name }} resource with the format set to `{{ format }}`">{{ format }}</a>
|
|
||||||
</li>
|
|
||||||
{% endfor %}
|
|
||||||
</ul>
|
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</fieldset>
|
|
||||||
</form>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% if options_form %}
|
|
||||||
<form class="button-form" action="{{ request.get_full_path }}" method="POST">
|
|
||||||
{% csrf_token %}
|
|
||||||
<input type="hidden" name="{{ api_settings.FORM_METHOD_OVERRIDE }}" value="OPTIONS" />
|
|
||||||
<button class="btn btn-primary js-tooltip" title="Make an OPTIONS request on the {{ name }} resource">OPTIONS</button>
|
|
||||||
</form>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% if delete_form %}
|
|
||||||
<form class="button-form" action="{{ request.get_full_path }}" method="POST">
|
|
||||||
{% csrf_token %}
|
|
||||||
<input type="hidden" name="{{ api_settings.FORM_METHOD_OVERRIDE }}" value="DELETE" />
|
|
||||||
<button class="btn btn-danger js-tooltip" title="Make a DELETE request on the {{ name }} resource">DELETE</button>
|
|
||||||
</form>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
<div class="content-main">
|
|
||||||
<div class="page-header"><h1>{{ name }}</h1></div>
|
|
||||||
{% block description %}
|
|
||||||
{{ description }}
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
<div class="request-info" style="clear: both" >
|
|
||||||
<pre class="prettyprint"><b>{{ request.method }}</b> {{ request.get_full_path }}</pre>
|
{% block breadcrumbs %}
|
||||||
</div>
|
<ul class="breadcrumb">
|
||||||
<div class="response-info">
|
{% for breadcrumb_name, breadcrumb_url in breadcrumblist %}
|
||||||
<pre class="prettyprint"><div class="meta nocode"><b>HTTP {{ response.status_code }} {{ response.status_text }}</b>{% autoescape off %}
|
<li>
|
||||||
|
<a href="{{ breadcrumb_url }}" {% if forloop.last %}class="active"{% endif %}>
|
||||||
|
{{ breadcrumb_name }}
|
||||||
|
</a>
|
||||||
|
{% if not forloop.last %}<span class="divider">›</span>{% endif %}
|
||||||
|
</li>
|
||||||
|
{% endfor %}
|
||||||
|
</ul>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
<!-- Content -->
|
||||||
|
<div id="content">
|
||||||
|
|
||||||
|
{% if 'GET' in allowed_methods %}
|
||||||
|
<form id="get-form" class="pull-right">
|
||||||
|
<fieldset>
|
||||||
|
<div class="btn-group format-selection">
|
||||||
|
<a class="btn btn-primary js-tooltip" href='{{ request.get_full_path }}'
|
||||||
|
rel="nofollow" title="Make a GET request on the {{ name }} resource">
|
||||||
|
GET
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<button class="btn btn-primary dropdown-toggle js-tooltip" data-toggle="dropdown"
|
||||||
|
title="Specify a format for the GET request">
|
||||||
|
<span class="caret"></span>
|
||||||
|
</button>
|
||||||
|
<ul class="dropdown-menu">
|
||||||
|
{% for format in available_formats %}
|
||||||
|
<li>
|
||||||
|
<a class="js-tooltip format-option"
|
||||||
|
href='{% add_query_param request api_settings.URL_FORMAT_OVERRIDE format %}'
|
||||||
|
rel="nofollow"
|
||||||
|
title="Make a GET request on the {{ name }} resource with the format set to `{{ format }}`">
|
||||||
|
{{ format }}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
{% endfor %}
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</fieldset>
|
||||||
|
</form>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if options_form %}
|
||||||
|
<form class="button-form" action="{{ request.get_full_path }}" method="POST">
|
||||||
|
{% csrf_token %}
|
||||||
|
<input type="hidden" name="{{ api_settings.FORM_METHOD_OVERRIDE }}" value="OPTIONS" />
|
||||||
|
<button class="btn btn-primary js-tooltip"
|
||||||
|
title="Make an OPTIONS request on the {{ name }} resource">
|
||||||
|
OPTIONS
|
||||||
|
</button>
|
||||||
|
</form>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if delete_form %}
|
||||||
|
<form class="button-form" action="{{ request.get_full_path }}" method="POST">
|
||||||
|
{% csrf_token %}
|
||||||
|
<input type="hidden" name="{{ api_settings.FORM_METHOD_OVERRIDE }}" value="DELETE" />
|
||||||
|
<button class="btn btn-danger js-tooltip"
|
||||||
|
title="Make a DELETE request on the {{ name }} resource">
|
||||||
|
DELETE
|
||||||
|
</button>
|
||||||
|
</form>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<div class="content-main">
|
||||||
|
<div class="page-header">
|
||||||
|
<h1>{{ name }}</h1>
|
||||||
|
</div>
|
||||||
|
{% block description %}
|
||||||
|
{{ description }}
|
||||||
|
{% endblock %}
|
||||||
|
<div class="request-info" style="clear: both" >
|
||||||
|
<pre class="prettyprint"><b>{{ request.method }}</b> {{ request.get_full_path }}</pre>
|
||||||
|
</div>
|
||||||
|
<div class="response-info">
|
||||||
|
<pre class="prettyprint"><div class="meta nocode"><b>HTTP {{ response.status_code }} {{ response.status_text }}</b>{% autoescape off %}
|
||||||
{% for key, val in response_headers.items %}<b>{{ key }}:</b> <span class="lit">{{ val|break_long_headers|urlize_quoted_links }}</span>
|
{% for key, val in response_headers.items %}<b>{{ key }}:</b> <span class="lit">{{ val|break_long_headers|urlize_quoted_links }}</span>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>{{ content|urlize_quoted_links }}</pre>{% endautoescape %}
|
</div>{{ content|urlize_quoted_links }}</pre>{% endautoescape %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{% if display_edit_forms %}
|
||||||
|
|
||||||
|
{% if post_form or raw_data_post_form %}
|
||||||
|
<div {% if post_form %}class="tabbable"{% endif %}>
|
||||||
|
{% if post_form %}
|
||||||
|
<ul class="nav nav-tabs form-switcher">
|
||||||
|
<li>
|
||||||
|
<a name='html-tab' href="#object-form" data-toggle="tab">HTML form</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a name='raw-tab' href="#generic-content-form" data-toggle="tab">Raw data</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
{% endif %}
|
||||||
|
<div class="well tab-content">
|
||||||
|
{% if post_form %}
|
||||||
|
<div class="tab-pane" id="object-form">
|
||||||
|
{% with form=post_form %}
|
||||||
|
<form action="{{ request.get_full_path }}"
|
||||||
|
method="POST" enctype="multipart/form-data" class="form-horizontal">
|
||||||
|
<fieldset>
|
||||||
|
{{ post_form }}
|
||||||
|
<div class="form-actions">
|
||||||
|
<button class="btn btn-primary"
|
||||||
|
title="Make a POST request on the {{ name }} resource">
|
||||||
|
POST
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</fieldset>
|
||||||
|
</form>
|
||||||
|
{% endwith %}
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
<div {% if post_form %}class="tab-pane"{% endif %} id="generic-content-form">
|
||||||
|
{% with form=raw_data_post_form %}
|
||||||
|
<form action="{{ request.get_full_path }}" method="POST" class="form-horizontal">
|
||||||
|
<fieldset>
|
||||||
|
{% include "rest_framework/raw_data_form.html" %}
|
||||||
|
<div class="form-actions">
|
||||||
|
<button class="btn btn-primary"
|
||||||
|
title="Make a POST request on the {{ name }} resource">
|
||||||
|
POST
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</fieldset>
|
||||||
|
</form>
|
||||||
|
{% endwith %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if put_form or raw_data_put_form or raw_data_patch_form %}
|
||||||
|
<div {% if put_form %}class="tabbable"{% endif %}>
|
||||||
|
{% if put_form %}
|
||||||
|
<ul class="nav nav-tabs form-switcher">
|
||||||
|
<li>
|
||||||
|
<a name='html-tab' href="#object-form" data-toggle="tab">HTML form</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a name='raw-tab' href="#generic-content-form" data-toggle="tab">Raw data</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
{% endif %}
|
||||||
|
<div class="well tab-content">
|
||||||
|
{% if put_form %}
|
||||||
|
<div class="tab-pane" id="object-form">
|
||||||
|
<form action="{{ request.get_full_path }}"
|
||||||
|
method="POST" enctype="multipart/form-data" class="form-horizontal">
|
||||||
|
<fieldset>
|
||||||
|
{{ put_form }}
|
||||||
|
<div class="form-actions">
|
||||||
|
<button class="btn btn-primary js-tooltip"
|
||||||
|
name="{{ api_settings.FORM_METHOD_OVERRIDE }}"
|
||||||
|
value="PUT" title="Make a PUT request on the {{ name }} resource">
|
||||||
|
PUT
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</fieldset>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
<div {% if put_form %}class="tab-pane"{% endif %} id="generic-content-form">
|
||||||
|
{% with form=raw_data_put_or_patch_form %}
|
||||||
|
<form action="{{ request.get_full_path }}" method="POST" class="form-horizontal">
|
||||||
|
<fieldset>
|
||||||
|
{% include "rest_framework/raw_data_form.html" %}
|
||||||
|
<div class="form-actions">
|
||||||
|
{% if raw_data_put_form %}
|
||||||
|
<button class="btn btn-primary js-tooltip"
|
||||||
|
name="{{ api_settings.FORM_METHOD_OVERRIDE }}"
|
||||||
|
value="PUT" title="Make a PUT request on the {{ name }} resource">
|
||||||
|
PUT
|
||||||
|
</button>
|
||||||
|
{% endif %}
|
||||||
|
{% if raw_data_patch_form %}
|
||||||
|
<button class="btn btn-primary js-tooltip"
|
||||||
|
name="{{ api_settings.FORM_METHOD_OVERRIDE }}"
|
||||||
|
value="PATCH" title="Make a PATCH request on the {{ name }} resource">
|
||||||
|
PATCH
|
||||||
|
</button>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
</fieldset>
|
||||||
|
</form>
|
||||||
|
{% endwith %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<!-- END Content -->
|
||||||
|
|
||||||
{% if display_edit_forms %}
|
<footer>
|
||||||
|
{% block footer %}
|
||||||
|
<p>Sponsored by <a href="http://dabapps.com/">DabApps</a>.</p>
|
||||||
|
{% endblock %}
|
||||||
|
</footer>
|
||||||
|
|
||||||
{% if post_form or raw_data_post_form %}
|
</div><!-- ./wrapper -->
|
||||||
<div {% if post_form %}class="tabbable"{% endif %}>
|
|
||||||
{% if post_form %}
|
|
||||||
<ul class="nav nav-tabs form-switcher">
|
|
||||||
<li><a name='html-tab' href="#object-form" data-toggle="tab">HTML form</a></li>
|
|
||||||
<li><a name='raw-tab' href="#generic-content-form" data-toggle="tab">Raw data</a></li>
|
|
||||||
</ul>
|
|
||||||
{% endif %}
|
|
||||||
<div class="well tab-content">
|
|
||||||
{% if post_form %}
|
|
||||||
<div class="tab-pane" id="object-form">
|
|
||||||
{% with form=post_form %}
|
|
||||||
<form action="{{ request.get_full_path }}" method="POST" enctype="multipart/form-data" class="form-horizontal">
|
|
||||||
<fieldset>
|
|
||||||
{{ post_form }}
|
|
||||||
<div class="form-actions">
|
|
||||||
<button class="btn btn-primary" title="Make a POST request on the {{ name }} resource">POST</button>
|
|
||||||
</div>
|
|
||||||
</fieldset>
|
|
||||||
</form>
|
|
||||||
{% endwith %}
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
<div {% if post_form %}class="tab-pane"{% endif %} id="generic-content-form">
|
|
||||||
{% with form=raw_data_post_form %}
|
|
||||||
<form action="{{ request.get_full_path }}" method="POST" class="form-horizontal">
|
|
||||||
<fieldset>
|
|
||||||
{% include "rest_framework/raw_data_form.html" %}
|
|
||||||
<div class="form-actions">
|
|
||||||
<button class="btn btn-primary" title="Make a POST request on the {{ name }} resource">POST</button>
|
|
||||||
</div>
|
|
||||||
</fieldset>
|
|
||||||
</form>
|
|
||||||
{% endwith %}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% if put_form or raw_data_put_form or raw_data_patch_form %}
|
{% block script %}
|
||||||
<div {% if put_form %}class="tabbable"{% endif %}>
|
<script src="{% static "rest_framework/js/jquery-1.8.1-min.js" %}"></script>
|
||||||
{% if put_form %}
|
<script src="{% static "rest_framework/js/bootstrap.min.js" %}"></script>
|
||||||
<ul class="nav nav-tabs form-switcher">
|
<script src="{% static "rest_framework/js/prettify-min.js" %}"></script>
|
||||||
<li><a name='html-tab' href="#object-form" data-toggle="tab">HTML form</a></li>
|
<script src="{% static "rest_framework/js/default.js" %}"></script>
|
||||||
<li><a name='raw-tab' href="#generic-content-form" data-toggle="tab">Raw data</a></li>
|
{% endblock %}
|
||||||
</ul>
|
</body>
|
||||||
{% endif %}
|
|
||||||
<div class="well tab-content">
|
|
||||||
{% if put_form %}
|
|
||||||
<div class="tab-pane" id="object-form">
|
|
||||||
<form action="{{ request.get_full_path }}" method="POST" enctype="multipart/form-data" class="form-horizontal">
|
|
||||||
<fieldset>
|
|
||||||
{{ put_form }}
|
|
||||||
<div class="form-actions">
|
|
||||||
<button class="btn btn-primary js-tooltip" name="{{ api_settings.FORM_METHOD_OVERRIDE }}" value="PUT" title="Make a PUT request on the {{ name }} resource">PUT</button>
|
|
||||||
</div>
|
|
||||||
</fieldset>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
<div {% if put_form %}class="tab-pane"{% endif %} id="generic-content-form">
|
|
||||||
{% with form=raw_data_put_or_patch_form %}
|
|
||||||
<form action="{{ request.get_full_path }}" method="POST" class="form-horizontal">
|
|
||||||
<fieldset>
|
|
||||||
{% include "rest_framework/raw_data_form.html" %}
|
|
||||||
<div class="form-actions">
|
|
||||||
{% if raw_data_put_form %}
|
|
||||||
<button class="btn btn-primary js-tooltip" name="{{ api_settings.FORM_METHOD_OVERRIDE }}" value="PUT" title="Make a PUT request on the {{ name }} resource">PUT</button>
|
|
||||||
{% endif %}
|
|
||||||
{% if raw_data_patch_form %}
|
|
||||||
<button class="btn btn-primary js-tooltip" name="{{ api_settings.FORM_METHOD_OVERRIDE }}" value="PATCH" title="Make a PATCH request on the {{ name }} resource">PATCH</button>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
</fieldset>
|
|
||||||
</form>
|
|
||||||
{% endwith %}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<!-- END content-main -->
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<!-- END Content -->
|
|
||||||
|
|
||||||
<div id="push"></div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div><!-- ./wrapper -->
|
|
||||||
|
|
||||||
{% block footer %}
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block script %}
|
|
||||||
<script src="{% static "rest_framework/js/jquery-1.8.1-min.js" %}"></script>
|
|
||||||
<script src="{% static "rest_framework/js/bootstrap.min.js" %}"></script>
|
|
||||||
<script src="{% static "rest_framework/js/prettify-min.js" %}"></script>
|
|
||||||
<script src="{% static "rest_framework/js/default.js" %}"></script>
|
|
||||||
{% endblock %}
|
|
||||||
</body>
|
|
||||||
</html>
|
</html>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user