mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-12-04 23:44:07 +03:00
Latest build with work from @alecperkins
This commit is contained in:
parent
58a19c6f16
commit
ea9f8a16e2
|
@ -8,47 +8,8 @@
|
||||||
|
|
||||||
<!-- Le styles -->
|
<!-- Le styles -->
|
||||||
<link href="http://tomchristie.github.com/django-rest-framework/css/bootstrap.css" rel="stylesheet">
|
<link href="http://tomchristie.github.com/django-rest-framework/css/bootstrap.css" rel="stylesheet">
|
||||||
<style type="text/css">
|
|
||||||
body {
|
|
||||||
padding-top: 60px;
|
|
||||||
padding-bottom: 40px;
|
|
||||||
}
|
|
||||||
.sidebar-nav {
|
|
||||||
padding: 9px 0;
|
|
||||||
}
|
|
||||||
.nav-list li.main {
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
blockquote {
|
|
||||||
font-family: Georgia, serif;
|
|
||||||
font-size: 18px;
|
|
||||||
font-style: italic;
|
|
||||||
margin: 0.25em 0;
|
|
||||||
padding: 0.25em 40px;
|
|
||||||
line-height: 1.45;
|
|
||||||
position: relative;
|
|
||||||
color: #383838;
|
|
||||||
border-left: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
blockquote:before {
|
|
||||||
display: block;
|
|
||||||
content: "\201C";
|
|
||||||
font-size: 80px;
|
|
||||||
position: absolute;
|
|
||||||
left: -10px;
|
|
||||||
top: -20px;
|
|
||||||
color: #7a7a7a;
|
|
||||||
}
|
|
||||||
|
|
||||||
blockquote p:last-child {
|
|
||||||
color: #999999;
|
|
||||||
font-size: 14px;
|
|
||||||
display: block;
|
|
||||||
margin-top: 5px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<link href="http://tomchristie.github.com/django-rest-framework/css/bootstrap-responsive.css" rel="stylesheet">
|
<link href="http://tomchristie.github.com/django-rest-framework/css/bootstrap-responsive.css" rel="stylesheet">
|
||||||
|
<link href="http://tomchristie.github.com/django-rest-framework/css/drf-styles.css" rel="stylesheet">
|
||||||
|
|
||||||
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
|
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
|
||||||
<!--[if lt IE 9]>
|
<!--[if lt IE 9]>
|
||||||
|
@ -124,13 +85,13 @@ margin-top: 5px;
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="row-fluid">
|
<div class="row-fluid">
|
||||||
<div class="span3">
|
<div class="span3">
|
||||||
<div class="well affix span3">
|
<div id="table-of-contents" class="well affix span3">
|
||||||
<ul class="nav nav-list side-nav">
|
<ul class="nav nav-list side-nav">
|
||||||
<li class="main"><a href="#authentication">Authentication</a></li>
|
<li class="main"><a href="#authentication">Authentication</a></li>
|
||||||
<li><a href="#how-authentication-is-determined">How authentication is determined</a></li>
|
<li><a href="#how-authentication-is-determined">How authentication is determined</a></li>
|
||||||
<li><a href="#setting-the-authentication-policy">Setting the authentication policy</a></li>
|
<li><a href="#setting-the-authentication-policy">Setting the authentication policy</a></li>
|
||||||
<li><a href="#userbasicauthentication">UserBasicAuthentication</a></li>
|
<li><a href="#userbasicauthentication">UserBasicAuthentication</a></li>
|
||||||
<li><a href="#tokenbasicauthentication">TokenBasicAuthentication</a></li>
|
<li><a href="#tokenauthentication">TokenAuthentication</a></li>
|
||||||
<li><a href="#oauthauthentication">OAuthAuthentication</a></li>
|
<li><a href="#oauthauthentication">OAuthAuthentication</a></li>
|
||||||
<li><a href="#sessionauthentication">SessionAuthentication</a></li>
|
<li><a href="#sessionauthentication">SessionAuthentication</a></li>
|
||||||
<li><a href="#custom-authentication-policies">Custom authentication policies</a></li>
|
<li><a href="#custom-authentication-policies">Custom authentication policies</a></li>
|
||||||
|
@ -139,14 +100,13 @@ margin-top: 5px;
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="span9">
|
<div id="main-content" class="span9">
|
||||||
<h1 id="authentication">Authentication</h1>
|
<h1 id="authentication">Authentication</h1>
|
||||||
<p>Authentication is the mechanism of associating an incoming request with a set of identifying credentials, such as the user the request came from, or the token that it was signed with. The <a href="permissions">permission</a> and <a href="throttling">throttling</a> policies can then use those credentials to determine if the request should be permitted.</p>
|
<p>Authentication is the mechanism of associating an incoming request with a set of identifying credentials, such as the user the request came from, or the token that it was signed with. The <a href="permissions">permission</a> and <a href="throttling">throttling</a> policies can then use those credentials to determine if the request should be permitted.</p>
|
||||||
<p>REST framework provides a number of authentication policies out of the box, and also allows you to implement custom policies.</p>
|
<p>REST framework provides a number of authentication policies out of the box, and also allows you to implement custom policies.</p>
|
||||||
<p>Authentication will run the first time either the <code>request.user</code> or <code>request.auth</code> properties are accessed, and determines how those properties are initialized.</p>
|
<p>Authentication will run the first time either the <code>request.user</code> or <code>request.auth</code> properties are accessed, and determines how those properties are initialized.</p>
|
||||||
<p>The <code>request.user</code> property will typically be set to an instance of the <code>contrib.auth</code> package's <code>User</code> class.</p>
|
<p>The <code>request.user</code> property will typically be set to an instance of the <code>contrib.auth</code> package's <code>User</code> class.</p>
|
||||||
<p>The <code>request.auth</code> property is used for any additional authentication information, for example, it may be used to represent an authentication token that the request was signed with.<br />
|
<p>The <code>request.auth</code> property is used for any additional authentication information, for example, it may be used to represent an authentication token that the request was signed with.</p>
|
||||||
</p>
|
|
||||||
<h2 id="how-authentication-is-determined">How authentication is determined</h2>
|
<h2 id="how-authentication-is-determined">How authentication is determined</h2>
|
||||||
<p>Authentication is always set as a list of classes. REST framework will attempt to authenticate with each class in the list, and will set <code>request.user</code> and <code>request.auth</code> using the return value of the first class that successfully authenticates.</p>
|
<p>Authentication is always set as a list of classes. REST framework will attempt to authenticate with each class in the list, and will set <code>request.user</code> and <code>request.auth</code> using the return value of the first class that successfully authenticates.</p>
|
||||||
<p>If no class authenticates, <code>request.user</code> will be set to an instance of <code>django.contrib.auth.models.AnonymousUser</code>, and <code>request.auth</code> will be set to <code>None</code>.</p>
|
<p>If no class authenticates, <code>request.user</code> will be set to an instance of <code>django.contrib.auth.models.AnonymousUser</code>, and <code>request.auth</code> will be set to <code>None</code>.</p>
|
||||||
|
@ -191,14 +151,17 @@ def example_view(request, format=None):
|
||||||
<li><code>request.user</code> will be a <code>django.contrib.auth.models.User</code> instance.</li>
|
<li><code>request.user</code> will be a <code>django.contrib.auth.models.User</code> instance.</li>
|
||||||
<li><code>request.auth</code> will be <code>None</code>.</li>
|
<li><code>request.auth</code> will be <code>None</code>.</li>
|
||||||
</ul>
|
</ul>
|
||||||
<h2 id="tokenbasicauthentication">TokenBasicAuthentication</h2>
|
<h2 id="tokenauthentication">TokenAuthentication</h2>
|
||||||
<p>This policy uses <a href="http://tools.ietf.org/html/rfc2617">HTTP Basic Authentication</a>, signed against a token key and secret. Token basic authentication is appropriate for client-server setups, such as native desktop and mobile clients.</p>
|
<p>This policy uses <a href="http://tools.ietf.org/html/rfc2617">HTTP Authentication</a> with no authentication scheme. Token basic authentication is appropriate for client-server setups, such as native desktop and mobile clients. The token key should be passed in as a string to the "Authorization" HTTP header. For example:</p>
|
||||||
<p><strong>Note:</strong> If you run <code>TokenBasicAuthentication</code> in production your API must be <code>https</code> only, or it will be completely insecure.</p>
|
<pre><code>curl http://my.api.org/ -X POST -H "Authorization: 0123456789abcdef0123456789abcdef"
|
||||||
<p>If successfully authenticated, <code>TokenBasicAuthentication</code> provides the following credentials.</p>
|
</code></pre>
|
||||||
|
<p><strong>Note:</strong> If you run <code>TokenAuthentication</code> in production your API must be <code>https</code> only, or it will be completely insecure.</p>
|
||||||
|
<p>If successfully authenticated, <code>TokenAuthentication</code> provides the following credentials.</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li><code>request.user</code> will be a <code>django.contrib.auth.models.User</code> instance.</li>
|
<li><code>request.user</code> will be a <code>django.contrib.auth.models.User</code> instance.</li>
|
||||||
<li><code>request.auth</code> will be a <code>djangorestframework.models.BasicToken</code> instance.</li>
|
<li><code>request.auth</code> will be a <code>djangorestframework.tokenauth.models.BasicToken</code> instance.</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
<p>To use the <code>TokenAuthentication</code> policy, you must have a token model. Django REST Framework comes with a minimal default token model. To use it, include <code>djangorestframework.tokenauth</code> in your installed applications and sync your database. To use your own token model, subclass the <code>djangorestframework.tokenauth.TokenAuthentication</code> class and specify a <code>model</code> attribute that references your custom token model. The token model must provide <code>user</code>, <code>key</code>, and <code>revoked</code> attributes. Refer to the <code>djangorestframework.tokenauth.models.BasicToken</code> model as an example.</p>
|
||||||
<h2 id="oauthauthentication">OAuthAuthentication</h2>
|
<h2 id="oauthauthentication">OAuthAuthentication</h2>
|
||||||
<p>This policy uses the <a href="http://oauth.net/2/">OAuth 2.0</a> protocol to authenticate requests. OAuth is appropriate for server-server setups, such as when you want to allow a third-party service to access your API on a user's behalf.</p>
|
<p>This policy uses the <a href="http://oauth.net/2/">OAuth 2.0</a> protocol to authenticate requests. OAuth is appropriate for server-server setups, such as when you want to allow a third-party service to access your API on a user's behalf.</p>
|
||||||
<p>If successfully authenticated, <code>OAuthAuthentication</code> provides the following credentials.</p>
|
<p>If successfully authenticated, <code>OAuthAuthentication</code> provides the following credentials.</p>
|
||||||
|
@ -222,9 +185,10 @@ def example_view(request, format=None):
|
||||||
<!-- Le javascript
|
<!-- Le javascript
|
||||||
================================================== -->
|
================================================== -->
|
||||||
<!-- Placed at the end of the document so the pages load faster -->
|
<!-- Placed at the end of the document so the pages load faster -->
|
||||||
<script src="http://tomchristie.github.com/django-rest-framework/js/jquery.js"></script>
|
<script src="http://tomchristie.github.com/django-rest-framework/js/jquery-1.8.1-min.js"></script>
|
||||||
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-dropdown.js"></script>
|
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-dropdown.js"></script>
|
||||||
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-scrollspy.js"></script>
|
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-scrollspy.js"></script>
|
||||||
|
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-collapse.js"></script>
|
||||||
<script>
|
<script>
|
||||||
//$('.side-nav').scrollspy()
|
//$('.side-nav').scrollspy()
|
||||||
var shiftWindow = function() { scrollBy(0, -50) };
|
var shiftWindow = function() { scrollBy(0, -50) };
|
||||||
|
|
|
@ -8,47 +8,8 @@
|
||||||
|
|
||||||
<!-- Le styles -->
|
<!-- Le styles -->
|
||||||
<link href="http://tomchristie.github.com/django-rest-framework/css/bootstrap.css" rel="stylesheet">
|
<link href="http://tomchristie.github.com/django-rest-framework/css/bootstrap.css" rel="stylesheet">
|
||||||
<style type="text/css">
|
|
||||||
body {
|
|
||||||
padding-top: 60px;
|
|
||||||
padding-bottom: 40px;
|
|
||||||
}
|
|
||||||
.sidebar-nav {
|
|
||||||
padding: 9px 0;
|
|
||||||
}
|
|
||||||
.nav-list li.main {
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
blockquote {
|
|
||||||
font-family: Georgia, serif;
|
|
||||||
font-size: 18px;
|
|
||||||
font-style: italic;
|
|
||||||
margin: 0.25em 0;
|
|
||||||
padding: 0.25em 40px;
|
|
||||||
line-height: 1.45;
|
|
||||||
position: relative;
|
|
||||||
color: #383838;
|
|
||||||
border-left: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
blockquote:before {
|
|
||||||
display: block;
|
|
||||||
content: "\201C";
|
|
||||||
font-size: 80px;
|
|
||||||
position: absolute;
|
|
||||||
left: -10px;
|
|
||||||
top: -20px;
|
|
||||||
color: #7a7a7a;
|
|
||||||
}
|
|
||||||
|
|
||||||
blockquote p:last-child {
|
|
||||||
color: #999999;
|
|
||||||
font-size: 14px;
|
|
||||||
display: block;
|
|
||||||
margin-top: 5px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<link href="http://tomchristie.github.com/django-rest-framework/css/bootstrap-responsive.css" rel="stylesheet">
|
<link href="http://tomchristie.github.com/django-rest-framework/css/bootstrap-responsive.css" rel="stylesheet">
|
||||||
|
<link href="http://tomchristie.github.com/django-rest-framework/css/drf-styles.css" rel="stylesheet">
|
||||||
|
|
||||||
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
|
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
|
||||||
<!--[if lt IE 9]>
|
<!--[if lt IE 9]>
|
||||||
|
@ -124,14 +85,14 @@ margin-top: 5px;
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="row-fluid">
|
<div class="row-fluid">
|
||||||
<div class="span3">
|
<div class="span3">
|
||||||
<div class="well affix span3">
|
<div id="table-of-contents" class="well affix span3">
|
||||||
<ul class="nav nav-list side-nav">
|
<ul class="nav nav-list side-nav">
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="span9">
|
<div id="main-content" class="span9">
|
||||||
<blockquote>
|
<blockquote>
|
||||||
<p>HTTP has provisions for several mechanisms for "content negotiation" -- the process of selecting the best representation for a given response when there are multiple representations available. -- RFC 2616, Fielding et al.</p>
|
<p>HTTP has provisions for several mechanisms for "content negotiation" -- the process of selecting the best representation for a given response when there are multiple representations available. -- RFC 2616, Fielding et al.</p>
|
||||||
</blockquote>
|
</blockquote>
|
||||||
|
@ -142,9 +103,10 @@ margin-top: 5px;
|
||||||
<!-- Le javascript
|
<!-- Le javascript
|
||||||
================================================== -->
|
================================================== -->
|
||||||
<!-- Placed at the end of the document so the pages load faster -->
|
<!-- Placed at the end of the document so the pages load faster -->
|
||||||
<script src="http://tomchristie.github.com/django-rest-framework/js/jquery.js"></script>
|
<script src="http://tomchristie.github.com/django-rest-framework/js/jquery-1.8.1-min.js"></script>
|
||||||
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-dropdown.js"></script>
|
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-dropdown.js"></script>
|
||||||
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-scrollspy.js"></script>
|
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-scrollspy.js"></script>
|
||||||
|
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-collapse.js"></script>
|
||||||
<script>
|
<script>
|
||||||
//$('.side-nav').scrollspy()
|
//$('.side-nav').scrollspy()
|
||||||
var shiftWindow = function() { scrollBy(0, -50) };
|
var shiftWindow = function() { scrollBy(0, -50) };
|
||||||
|
|
|
@ -8,47 +8,8 @@
|
||||||
|
|
||||||
<!-- Le styles -->
|
<!-- Le styles -->
|
||||||
<link href="http://tomchristie.github.com/django-rest-framework/css/bootstrap.css" rel="stylesheet">
|
<link href="http://tomchristie.github.com/django-rest-framework/css/bootstrap.css" rel="stylesheet">
|
||||||
<style type="text/css">
|
|
||||||
body {
|
|
||||||
padding-top: 60px;
|
|
||||||
padding-bottom: 40px;
|
|
||||||
}
|
|
||||||
.sidebar-nav {
|
|
||||||
padding: 9px 0;
|
|
||||||
}
|
|
||||||
.nav-list li.main {
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
blockquote {
|
|
||||||
font-family: Georgia, serif;
|
|
||||||
font-size: 18px;
|
|
||||||
font-style: italic;
|
|
||||||
margin: 0.25em 0;
|
|
||||||
padding: 0.25em 40px;
|
|
||||||
line-height: 1.45;
|
|
||||||
position: relative;
|
|
||||||
color: #383838;
|
|
||||||
border-left: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
blockquote:before {
|
|
||||||
display: block;
|
|
||||||
content: "\201C";
|
|
||||||
font-size: 80px;
|
|
||||||
position: absolute;
|
|
||||||
left: -10px;
|
|
||||||
top: -20px;
|
|
||||||
color: #7a7a7a;
|
|
||||||
}
|
|
||||||
|
|
||||||
blockquote p:last-child {
|
|
||||||
color: #999999;
|
|
||||||
font-size: 14px;
|
|
||||||
display: block;
|
|
||||||
margin-top: 5px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<link href="http://tomchristie.github.com/django-rest-framework/css/bootstrap-responsive.css" rel="stylesheet">
|
<link href="http://tomchristie.github.com/django-rest-framework/css/bootstrap-responsive.css" rel="stylesheet">
|
||||||
|
<link href="http://tomchristie.github.com/django-rest-framework/css/drf-styles.css" rel="stylesheet">
|
||||||
|
|
||||||
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
|
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
|
||||||
<!--[if lt IE 9]>
|
<!--[if lt IE 9]>
|
||||||
|
@ -124,7 +85,7 @@ margin-top: 5px;
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="row-fluid">
|
<div class="row-fluid">
|
||||||
<div class="span3">
|
<div class="span3">
|
||||||
<div class="well affix span3">
|
<div id="table-of-contents" class="well affix span3">
|
||||||
<ul class="nav nav-list side-nav">
|
<ul class="nav nav-list side-nav">
|
||||||
<li class="main"><a href="#exceptions">Exceptions</a></li>
|
<li class="main"><a href="#exceptions">Exceptions</a></li>
|
||||||
|
|
||||||
|
@ -132,7 +93,7 @@ margin-top: 5px;
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="span9">
|
<div id="main-content" class="span9">
|
||||||
<h1 id="exceptions">Exceptions</h1>
|
<h1 id="exceptions">Exceptions</h1>
|
||||||
</div><!--/span-->
|
</div><!--/span-->
|
||||||
</div><!--/row-->
|
</div><!--/row-->
|
||||||
|
@ -141,9 +102,10 @@ margin-top: 5px;
|
||||||
<!-- Le javascript
|
<!-- Le javascript
|
||||||
================================================== -->
|
================================================== -->
|
||||||
<!-- Placed at the end of the document so the pages load faster -->
|
<!-- Placed at the end of the document so the pages load faster -->
|
||||||
<script src="http://tomchristie.github.com/django-rest-framework/js/jquery.js"></script>
|
<script src="http://tomchristie.github.com/django-rest-framework/js/jquery-1.8.1-min.js"></script>
|
||||||
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-dropdown.js"></script>
|
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-dropdown.js"></script>
|
||||||
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-scrollspy.js"></script>
|
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-scrollspy.js"></script>
|
||||||
|
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-collapse.js"></script>
|
||||||
<script>
|
<script>
|
||||||
//$('.side-nav').scrollspy()
|
//$('.side-nav').scrollspy()
|
||||||
var shiftWindow = function() { scrollBy(0, -50) };
|
var shiftWindow = function() { scrollBy(0, -50) };
|
||||||
|
|
|
@ -8,47 +8,8 @@
|
||||||
|
|
||||||
<!-- Le styles -->
|
<!-- Le styles -->
|
||||||
<link href="http://tomchristie.github.com/django-rest-framework/css/bootstrap.css" rel="stylesheet">
|
<link href="http://tomchristie.github.com/django-rest-framework/css/bootstrap.css" rel="stylesheet">
|
||||||
<style type="text/css">
|
|
||||||
body {
|
|
||||||
padding-top: 60px;
|
|
||||||
padding-bottom: 40px;
|
|
||||||
}
|
|
||||||
.sidebar-nav {
|
|
||||||
padding: 9px 0;
|
|
||||||
}
|
|
||||||
.nav-list li.main {
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
blockquote {
|
|
||||||
font-family: Georgia, serif;
|
|
||||||
font-size: 18px;
|
|
||||||
font-style: italic;
|
|
||||||
margin: 0.25em 0;
|
|
||||||
padding: 0.25em 40px;
|
|
||||||
line-height: 1.45;
|
|
||||||
position: relative;
|
|
||||||
color: #383838;
|
|
||||||
border-left: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
blockquote:before {
|
|
||||||
display: block;
|
|
||||||
content: "\201C";
|
|
||||||
font-size: 80px;
|
|
||||||
position: absolute;
|
|
||||||
left: -10px;
|
|
||||||
top: -20px;
|
|
||||||
color: #7a7a7a;
|
|
||||||
}
|
|
||||||
|
|
||||||
blockquote p:last-child {
|
|
||||||
color: #999999;
|
|
||||||
font-size: 14px;
|
|
||||||
display: block;
|
|
||||||
margin-top: 5px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<link href="http://tomchristie.github.com/django-rest-framework/css/bootstrap-responsive.css" rel="stylesheet">
|
<link href="http://tomchristie.github.com/django-rest-framework/css/bootstrap-responsive.css" rel="stylesheet">
|
||||||
|
<link href="http://tomchristie.github.com/django-rest-framework/css/drf-styles.css" rel="stylesheet">
|
||||||
|
|
||||||
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
|
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
|
||||||
<!--[if lt IE 9]>
|
<!--[if lt IE 9]>
|
||||||
|
@ -124,7 +85,7 @@ margin-top: 5px;
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="row-fluid">
|
<div class="row-fluid">
|
||||||
<div class="span3">
|
<div class="span3">
|
||||||
<div class="well affix span3">
|
<div id="table-of-contents" class="well affix span3">
|
||||||
<ul class="nav nav-list side-nav">
|
<ul class="nav nav-list side-nav">
|
||||||
<li class="main"><a href="#parsers">Parsers</a></li>
|
<li class="main"><a href="#parsers">Parsers</a></li>
|
||||||
<li><a href="#parse(request)">.parse(request)</a></li>
|
<li><a href="#parse(request)">.parse(request)</a></li>
|
||||||
|
@ -133,7 +94,7 @@ margin-top: 5px;
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="span9">
|
<div id="main-content" class="span9">
|
||||||
<h1 id="parsers">Parsers</h1>
|
<h1 id="parsers">Parsers</h1>
|
||||||
<h2 id="parserequest">.parse(request)</h2>
|
<h2 id="parserequest">.parse(request)</h2>
|
||||||
</div><!--/span-->
|
</div><!--/span-->
|
||||||
|
@ -143,9 +104,10 @@ margin-top: 5px;
|
||||||
<!-- Le javascript
|
<!-- Le javascript
|
||||||
================================================== -->
|
================================================== -->
|
||||||
<!-- Placed at the end of the document so the pages load faster -->
|
<!-- Placed at the end of the document so the pages load faster -->
|
||||||
<script src="http://tomchristie.github.com/django-rest-framework/js/jquery.js"></script>
|
<script src="http://tomchristie.github.com/django-rest-framework/js/jquery-1.8.1-min.js"></script>
|
||||||
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-dropdown.js"></script>
|
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-dropdown.js"></script>
|
||||||
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-scrollspy.js"></script>
|
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-scrollspy.js"></script>
|
||||||
|
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-collapse.js"></script>
|
||||||
<script>
|
<script>
|
||||||
//$('.side-nav').scrollspy()
|
//$('.side-nav').scrollspy()
|
||||||
var shiftWindow = function() { scrollBy(0, -50) };
|
var shiftWindow = function() { scrollBy(0, -50) };
|
||||||
|
|
|
@ -8,47 +8,8 @@
|
||||||
|
|
||||||
<!-- Le styles -->
|
<!-- Le styles -->
|
||||||
<link href="http://tomchristie.github.com/django-rest-framework/css/bootstrap.css" rel="stylesheet">
|
<link href="http://tomchristie.github.com/django-rest-framework/css/bootstrap.css" rel="stylesheet">
|
||||||
<style type="text/css">
|
|
||||||
body {
|
|
||||||
padding-top: 60px;
|
|
||||||
padding-bottom: 40px;
|
|
||||||
}
|
|
||||||
.sidebar-nav {
|
|
||||||
padding: 9px 0;
|
|
||||||
}
|
|
||||||
.nav-list li.main {
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
blockquote {
|
|
||||||
font-family: Georgia, serif;
|
|
||||||
font-size: 18px;
|
|
||||||
font-style: italic;
|
|
||||||
margin: 0.25em 0;
|
|
||||||
padding: 0.25em 40px;
|
|
||||||
line-height: 1.45;
|
|
||||||
position: relative;
|
|
||||||
color: #383838;
|
|
||||||
border-left: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
blockquote:before {
|
|
||||||
display: block;
|
|
||||||
content: "\201C";
|
|
||||||
font-size: 80px;
|
|
||||||
position: absolute;
|
|
||||||
left: -10px;
|
|
||||||
top: -20px;
|
|
||||||
color: #7a7a7a;
|
|
||||||
}
|
|
||||||
|
|
||||||
blockquote p:last-child {
|
|
||||||
color: #999999;
|
|
||||||
font-size: 14px;
|
|
||||||
display: block;
|
|
||||||
margin-top: 5px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<link href="http://tomchristie.github.com/django-rest-framework/css/bootstrap-responsive.css" rel="stylesheet">
|
<link href="http://tomchristie.github.com/django-rest-framework/css/bootstrap-responsive.css" rel="stylesheet">
|
||||||
|
<link href="http://tomchristie.github.com/django-rest-framework/css/drf-styles.css" rel="stylesheet">
|
||||||
|
|
||||||
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
|
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
|
||||||
<!--[if lt IE 9]>
|
<!--[if lt IE 9]>
|
||||||
|
@ -124,14 +85,14 @@ margin-top: 5px;
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="row-fluid">
|
<div class="row-fluid">
|
||||||
<div class="span3">
|
<div class="span3">
|
||||||
<div class="well affix span3">
|
<div id="table-of-contents" class="well affix span3">
|
||||||
<ul class="nav nav-list side-nav">
|
<ul class="nav nav-list side-nav">
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="span9">
|
<div id="main-content" class="span9">
|
||||||
|
|
||||||
</div><!--/span-->
|
</div><!--/span-->
|
||||||
</div><!--/row-->
|
</div><!--/row-->
|
||||||
|
@ -140,9 +101,10 @@ margin-top: 5px;
|
||||||
<!-- Le javascript
|
<!-- Le javascript
|
||||||
================================================== -->
|
================================================== -->
|
||||||
<!-- Placed at the end of the document so the pages load faster -->
|
<!-- Placed at the end of the document so the pages load faster -->
|
||||||
<script src="http://tomchristie.github.com/django-rest-framework/js/jquery.js"></script>
|
<script src="http://tomchristie.github.com/django-rest-framework/js/jquery-1.8.1-min.js"></script>
|
||||||
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-dropdown.js"></script>
|
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-dropdown.js"></script>
|
||||||
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-scrollspy.js"></script>
|
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-scrollspy.js"></script>
|
||||||
|
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-collapse.js"></script>
|
||||||
<script>
|
<script>
|
||||||
//$('.side-nav').scrollspy()
|
//$('.side-nav').scrollspy()
|
||||||
var shiftWindow = function() { scrollBy(0, -50) };
|
var shiftWindow = function() { scrollBy(0, -50) };
|
||||||
|
|
|
@ -8,47 +8,8 @@
|
||||||
|
|
||||||
<!-- Le styles -->
|
<!-- Le styles -->
|
||||||
<link href="http://tomchristie.github.com/django-rest-framework/css/bootstrap.css" rel="stylesheet">
|
<link href="http://tomchristie.github.com/django-rest-framework/css/bootstrap.css" rel="stylesheet">
|
||||||
<style type="text/css">
|
|
||||||
body {
|
|
||||||
padding-top: 60px;
|
|
||||||
padding-bottom: 40px;
|
|
||||||
}
|
|
||||||
.sidebar-nav {
|
|
||||||
padding: 9px 0;
|
|
||||||
}
|
|
||||||
.nav-list li.main {
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
blockquote {
|
|
||||||
font-family: Georgia, serif;
|
|
||||||
font-size: 18px;
|
|
||||||
font-style: italic;
|
|
||||||
margin: 0.25em 0;
|
|
||||||
padding: 0.25em 40px;
|
|
||||||
line-height: 1.45;
|
|
||||||
position: relative;
|
|
||||||
color: #383838;
|
|
||||||
border-left: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
blockquote:before {
|
|
||||||
display: block;
|
|
||||||
content: "\201C";
|
|
||||||
font-size: 80px;
|
|
||||||
position: absolute;
|
|
||||||
left: -10px;
|
|
||||||
top: -20px;
|
|
||||||
color: #7a7a7a;
|
|
||||||
}
|
|
||||||
|
|
||||||
blockquote p:last-child {
|
|
||||||
color: #999999;
|
|
||||||
font-size: 14px;
|
|
||||||
display: block;
|
|
||||||
margin-top: 5px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<link href="http://tomchristie.github.com/django-rest-framework/css/bootstrap-responsive.css" rel="stylesheet">
|
<link href="http://tomchristie.github.com/django-rest-framework/css/bootstrap-responsive.css" rel="stylesheet">
|
||||||
|
<link href="http://tomchristie.github.com/django-rest-framework/css/drf-styles.css" rel="stylesheet">
|
||||||
|
|
||||||
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
|
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
|
||||||
<!--[if lt IE 9]>
|
<!--[if lt IE 9]>
|
||||||
|
@ -124,7 +85,7 @@ margin-top: 5px;
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="row-fluid">
|
<div class="row-fluid">
|
||||||
<div class="span3">
|
<div class="span3">
|
||||||
<div class="well affix span3">
|
<div id="table-of-contents" class="well affix span3">
|
||||||
<ul class="nav nav-list side-nav">
|
<ul class="nav nav-list side-nav">
|
||||||
<li class="main"><a href="#renderers">Renderers</a></li>
|
<li class="main"><a href="#renderers">Renderers</a></li>
|
||||||
<li><a href="#render(response)">.render(response)</a></li>
|
<li><a href="#render(response)">.render(response)</a></li>
|
||||||
|
@ -133,7 +94,7 @@ margin-top: 5px;
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="span9">
|
<div id="main-content" class="span9">
|
||||||
<h1 id="renderers">Renderers</h1>
|
<h1 id="renderers">Renderers</h1>
|
||||||
<h2 id="renderresponse">.render(response)</h2>
|
<h2 id="renderresponse">.render(response)</h2>
|
||||||
</div><!--/span-->
|
</div><!--/span-->
|
||||||
|
@ -143,9 +104,10 @@ margin-top: 5px;
|
||||||
<!-- Le javascript
|
<!-- Le javascript
|
||||||
================================================== -->
|
================================================== -->
|
||||||
<!-- Placed at the end of the document so the pages load faster -->
|
<!-- Placed at the end of the document so the pages load faster -->
|
||||||
<script src="http://tomchristie.github.com/django-rest-framework/js/jquery.js"></script>
|
<script src="http://tomchristie.github.com/django-rest-framework/js/jquery-1.8.1-min.js"></script>
|
||||||
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-dropdown.js"></script>
|
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-dropdown.js"></script>
|
||||||
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-scrollspy.js"></script>
|
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-scrollspy.js"></script>
|
||||||
|
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-collapse.js"></script>
|
||||||
<script>
|
<script>
|
||||||
//$('.side-nav').scrollspy()
|
//$('.side-nav').scrollspy()
|
||||||
var shiftWindow = function() { scrollBy(0, -50) };
|
var shiftWindow = function() { scrollBy(0, -50) };
|
||||||
|
|
|
@ -8,47 +8,8 @@
|
||||||
|
|
||||||
<!-- Le styles -->
|
<!-- Le styles -->
|
||||||
<link href="http://tomchristie.github.com/django-rest-framework/css/bootstrap.css" rel="stylesheet">
|
<link href="http://tomchristie.github.com/django-rest-framework/css/bootstrap.css" rel="stylesheet">
|
||||||
<style type="text/css">
|
|
||||||
body {
|
|
||||||
padding-top: 60px;
|
|
||||||
padding-bottom: 40px;
|
|
||||||
}
|
|
||||||
.sidebar-nav {
|
|
||||||
padding: 9px 0;
|
|
||||||
}
|
|
||||||
.nav-list li.main {
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
blockquote {
|
|
||||||
font-family: Georgia, serif;
|
|
||||||
font-size: 18px;
|
|
||||||
font-style: italic;
|
|
||||||
margin: 0.25em 0;
|
|
||||||
padding: 0.25em 40px;
|
|
||||||
line-height: 1.45;
|
|
||||||
position: relative;
|
|
||||||
color: #383838;
|
|
||||||
border-left: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
blockquote:before {
|
|
||||||
display: block;
|
|
||||||
content: "\201C";
|
|
||||||
font-size: 80px;
|
|
||||||
position: absolute;
|
|
||||||
left: -10px;
|
|
||||||
top: -20px;
|
|
||||||
color: #7a7a7a;
|
|
||||||
}
|
|
||||||
|
|
||||||
blockquote p:last-child {
|
|
||||||
color: #999999;
|
|
||||||
font-size: 14px;
|
|
||||||
display: block;
|
|
||||||
margin-top: 5px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<link href="http://tomchristie.github.com/django-rest-framework/css/bootstrap-responsive.css" rel="stylesheet">
|
<link href="http://tomchristie.github.com/django-rest-framework/css/bootstrap-responsive.css" rel="stylesheet">
|
||||||
|
<link href="http://tomchristie.github.com/django-rest-framework/css/drf-styles.css" rel="stylesheet">
|
||||||
|
|
||||||
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
|
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
|
||||||
<!--[if lt IE 9]>
|
<!--[if lt IE 9]>
|
||||||
|
@ -124,7 +85,7 @@ margin-top: 5px;
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="row-fluid">
|
<div class="row-fluid">
|
||||||
<div class="span3">
|
<div class="span3">
|
||||||
<div class="well affix span3">
|
<div id="table-of-contents" class="well affix span3">
|
||||||
<ul class="nav nav-list side-nav">
|
<ul class="nav nav-list side-nav">
|
||||||
<li class="main"><a href="#requests">Requests</a></li>
|
<li class="main"><a href="#requests">Requests</a></li>
|
||||||
<li><a href="#method">.method</a></li>
|
<li><a href="#method">.method</a></li>
|
||||||
|
@ -141,7 +102,7 @@ margin-top: 5px;
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="span9">
|
<div id="main-content" class="span9">
|
||||||
<h1 id="requests">Requests</h1>
|
<h1 id="requests">Requests</h1>
|
||||||
<blockquote>
|
<blockquote>
|
||||||
<p>If you're doing REST-based web service stuff ... you should ignore request.POST.</p>
|
<p>If you're doing REST-based web service stuff ... you should ignore request.POST.</p>
|
||||||
|
@ -184,9 +145,10 @@ margin-top: 5px;
|
||||||
<!-- Le javascript
|
<!-- Le javascript
|
||||||
================================================== -->
|
================================================== -->
|
||||||
<!-- Placed at the end of the document so the pages load faster -->
|
<!-- Placed at the end of the document so the pages load faster -->
|
||||||
<script src="http://tomchristie.github.com/django-rest-framework/js/jquery.js"></script>
|
<script src="http://tomchristie.github.com/django-rest-framework/js/jquery-1.8.1-min.js"></script>
|
||||||
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-dropdown.js"></script>
|
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-dropdown.js"></script>
|
||||||
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-scrollspy.js"></script>
|
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-scrollspy.js"></script>
|
||||||
|
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-collapse.js"></script>
|
||||||
<script>
|
<script>
|
||||||
//$('.side-nav').scrollspy()
|
//$('.side-nav').scrollspy()
|
||||||
var shiftWindow = function() { scrollBy(0, -50) };
|
var shiftWindow = function() { scrollBy(0, -50) };
|
||||||
|
|
|
@ -8,47 +8,8 @@
|
||||||
|
|
||||||
<!-- Le styles -->
|
<!-- Le styles -->
|
||||||
<link href="http://tomchristie.github.com/django-rest-framework/css/bootstrap.css" rel="stylesheet">
|
<link href="http://tomchristie.github.com/django-rest-framework/css/bootstrap.css" rel="stylesheet">
|
||||||
<style type="text/css">
|
|
||||||
body {
|
|
||||||
padding-top: 60px;
|
|
||||||
padding-bottom: 40px;
|
|
||||||
}
|
|
||||||
.sidebar-nav {
|
|
||||||
padding: 9px 0;
|
|
||||||
}
|
|
||||||
.nav-list li.main {
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
blockquote {
|
|
||||||
font-family: Georgia, serif;
|
|
||||||
font-size: 18px;
|
|
||||||
font-style: italic;
|
|
||||||
margin: 0.25em 0;
|
|
||||||
padding: 0.25em 40px;
|
|
||||||
line-height: 1.45;
|
|
||||||
position: relative;
|
|
||||||
color: #383838;
|
|
||||||
border-left: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
blockquote:before {
|
|
||||||
display: block;
|
|
||||||
content: "\201C";
|
|
||||||
font-size: 80px;
|
|
||||||
position: absolute;
|
|
||||||
left: -10px;
|
|
||||||
top: -20px;
|
|
||||||
color: #7a7a7a;
|
|
||||||
}
|
|
||||||
|
|
||||||
blockquote p:last-child {
|
|
||||||
color: #999999;
|
|
||||||
font-size: 14px;
|
|
||||||
display: block;
|
|
||||||
margin-top: 5px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<link href="http://tomchristie.github.com/django-rest-framework/css/bootstrap-responsive.css" rel="stylesheet">
|
<link href="http://tomchristie.github.com/django-rest-framework/css/bootstrap-responsive.css" rel="stylesheet">
|
||||||
|
<link href="http://tomchristie.github.com/django-rest-framework/css/drf-styles.css" rel="stylesheet">
|
||||||
|
|
||||||
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
|
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
|
||||||
<!--[if lt IE 9]>
|
<!--[if lt IE 9]>
|
||||||
|
@ -124,7 +85,7 @@ margin-top: 5px;
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="row-fluid">
|
<div class="row-fluid">
|
||||||
<div class="span3">
|
<div class="span3">
|
||||||
<div class="well affix span3">
|
<div id="table-of-contents" class="well affix span3">
|
||||||
<ul class="nav nav-list side-nav">
|
<ul class="nav nav-list side-nav">
|
||||||
<li class="main"><a href="#responses">Responses</a></li>
|
<li class="main"><a href="#responses">Responses</a></li>
|
||||||
<li><a href="#response(content,-headers=none,--renderers=none,-view=none,-format=none,-status=none)">Response(content, headers=None, renderers=None, view=None, format=None, status=None)</a></li>
|
<li><a href="#response(content,-headers=none,--renderers=none,-view=none,-format=none,-status=none)">Response(content, headers=None, renderers=None, view=None, format=None, status=None)</a></li>
|
||||||
|
@ -136,7 +97,7 @@ margin-top: 5px;
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="span9">
|
<div id="main-content" class="span9">
|
||||||
<h1 id="responses">Responses</h1>
|
<h1 id="responses">Responses</h1>
|
||||||
<blockquote>
|
<blockquote>
|
||||||
<p>Unlike basic HttpResponse objects, TemplateResponse objects retain the details of the context that was provided by the view to compute the response. The final output of the response is not computed until it is needed, later in the response process.</p>
|
<p>Unlike basic HttpResponse objects, TemplateResponse objects retain the details of the context that was provided by the view to compute the response. The final output of the response is not computed until it is needed, later in the response process.</p>
|
||||||
|
@ -156,9 +117,10 @@ margin-top: 5px;
|
||||||
<!-- Le javascript
|
<!-- Le javascript
|
||||||
================================================== -->
|
================================================== -->
|
||||||
<!-- Placed at the end of the document so the pages load faster -->
|
<!-- Placed at the end of the document so the pages load faster -->
|
||||||
<script src="http://tomchristie.github.com/django-rest-framework/js/jquery.js"></script>
|
<script src="http://tomchristie.github.com/django-rest-framework/js/jquery-1.8.1-min.js"></script>
|
||||||
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-dropdown.js"></script>
|
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-dropdown.js"></script>
|
||||||
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-scrollspy.js"></script>
|
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-scrollspy.js"></script>
|
||||||
|
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-collapse.js"></script>
|
||||||
<script>
|
<script>
|
||||||
//$('.side-nav').scrollspy()
|
//$('.side-nav').scrollspy()
|
||||||
var shiftWindow = function() { scrollBy(0, -50) };
|
var shiftWindow = function() { scrollBy(0, -50) };
|
||||||
|
|
|
@ -8,47 +8,8 @@
|
||||||
|
|
||||||
<!-- Le styles -->
|
<!-- Le styles -->
|
||||||
<link href="http://tomchristie.github.com/django-rest-framework/css/bootstrap.css" rel="stylesheet">
|
<link href="http://tomchristie.github.com/django-rest-framework/css/bootstrap.css" rel="stylesheet">
|
||||||
<style type="text/css">
|
|
||||||
body {
|
|
||||||
padding-top: 60px;
|
|
||||||
padding-bottom: 40px;
|
|
||||||
}
|
|
||||||
.sidebar-nav {
|
|
||||||
padding: 9px 0;
|
|
||||||
}
|
|
||||||
.nav-list li.main {
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
blockquote {
|
|
||||||
font-family: Georgia, serif;
|
|
||||||
font-size: 18px;
|
|
||||||
font-style: italic;
|
|
||||||
margin: 0.25em 0;
|
|
||||||
padding: 0.25em 40px;
|
|
||||||
line-height: 1.45;
|
|
||||||
position: relative;
|
|
||||||
color: #383838;
|
|
||||||
border-left: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
blockquote:before {
|
|
||||||
display: block;
|
|
||||||
content: "\201C";
|
|
||||||
font-size: 80px;
|
|
||||||
position: absolute;
|
|
||||||
left: -10px;
|
|
||||||
top: -20px;
|
|
||||||
color: #7a7a7a;
|
|
||||||
}
|
|
||||||
|
|
||||||
blockquote p:last-child {
|
|
||||||
color: #999999;
|
|
||||||
font-size: 14px;
|
|
||||||
display: block;
|
|
||||||
margin-top: 5px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<link href="http://tomchristie.github.com/django-rest-framework/css/bootstrap-responsive.css" rel="stylesheet">
|
<link href="http://tomchristie.github.com/django-rest-framework/css/bootstrap-responsive.css" rel="stylesheet">
|
||||||
|
<link href="http://tomchristie.github.com/django-rest-framework/css/drf-styles.css" rel="stylesheet">
|
||||||
|
|
||||||
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
|
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
|
||||||
<!--[if lt IE 9]>
|
<!--[if lt IE 9]>
|
||||||
|
@ -124,7 +85,7 @@ margin-top: 5px;
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="row-fluid">
|
<div class="row-fluid">
|
||||||
<div class="span3">
|
<div class="span3">
|
||||||
<div class="well affix span3">
|
<div id="table-of-contents" class="well affix span3">
|
||||||
<ul class="nav nav-list side-nav">
|
<ul class="nav nav-list side-nav">
|
||||||
<li class="main"><a href="#returning-uris-from-your-web-apis">Returning URIs from your Web APIs</a></li>
|
<li class="main"><a href="#returning-uris-from-your-web-apis">Returning URIs from your Web APIs</a></li>
|
||||||
<li><a href="#reverse(viewname,-request,-*args,-**kwargs)">reverse(viewname, request, *args, **kwargs)</a></li>
|
<li><a href="#reverse(viewname,-request,-*args,-**kwargs)">reverse(viewname, request, *args, **kwargs)</a></li>
|
||||||
|
@ -134,7 +95,7 @@ margin-top: 5px;
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="span9">
|
<div id="main-content" class="span9">
|
||||||
<h1 id="returning-uris-from-your-web-apis">Returning URIs from your Web APIs</h1>
|
<h1 id="returning-uris-from-your-web-apis">Returning URIs from your Web APIs</h1>
|
||||||
<blockquote>
|
<blockquote>
|
||||||
<p>The central feature that distinguishes the REST architectural style from other network-based styles is its emphasis on a uniform interface between components.</p>
|
<p>The central feature that distinguishes the REST architectural style from other network-based styles is its emphasis on a uniform interface between components.</p>
|
||||||
|
@ -172,9 +133,10 @@ class MyView(APIView):
|
||||||
<!-- Le javascript
|
<!-- Le javascript
|
||||||
================================================== -->
|
================================================== -->
|
||||||
<!-- Placed at the end of the document so the pages load faster -->
|
<!-- Placed at the end of the document so the pages load faster -->
|
||||||
<script src="http://tomchristie.github.com/django-rest-framework/js/jquery.js"></script>
|
<script src="http://tomchristie.github.com/django-rest-framework/js/jquery-1.8.1-min.js"></script>
|
||||||
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-dropdown.js"></script>
|
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-dropdown.js"></script>
|
||||||
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-scrollspy.js"></script>
|
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-scrollspy.js"></script>
|
||||||
|
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-collapse.js"></script>
|
||||||
<script>
|
<script>
|
||||||
//$('.side-nav').scrollspy()
|
//$('.side-nav').scrollspy()
|
||||||
var shiftWindow = function() { scrollBy(0, -50) };
|
var shiftWindow = function() { scrollBy(0, -50) };
|
||||||
|
|
|
@ -8,47 +8,8 @@
|
||||||
|
|
||||||
<!-- Le styles -->
|
<!-- Le styles -->
|
||||||
<link href="http://tomchristie.github.com/django-rest-framework/css/bootstrap.css" rel="stylesheet">
|
<link href="http://tomchristie.github.com/django-rest-framework/css/bootstrap.css" rel="stylesheet">
|
||||||
<style type="text/css">
|
|
||||||
body {
|
|
||||||
padding-top: 60px;
|
|
||||||
padding-bottom: 40px;
|
|
||||||
}
|
|
||||||
.sidebar-nav {
|
|
||||||
padding: 9px 0;
|
|
||||||
}
|
|
||||||
.nav-list li.main {
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
blockquote {
|
|
||||||
font-family: Georgia, serif;
|
|
||||||
font-size: 18px;
|
|
||||||
font-style: italic;
|
|
||||||
margin: 0.25em 0;
|
|
||||||
padding: 0.25em 40px;
|
|
||||||
line-height: 1.45;
|
|
||||||
position: relative;
|
|
||||||
color: #383838;
|
|
||||||
border-left: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
blockquote:before {
|
|
||||||
display: block;
|
|
||||||
content: "\201C";
|
|
||||||
font-size: 80px;
|
|
||||||
position: absolute;
|
|
||||||
left: -10px;
|
|
||||||
top: -20px;
|
|
||||||
color: #7a7a7a;
|
|
||||||
}
|
|
||||||
|
|
||||||
blockquote p:last-child {
|
|
||||||
color: #999999;
|
|
||||||
font-size: 14px;
|
|
||||||
display: block;
|
|
||||||
margin-top: 5px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<link href="http://tomchristie.github.com/django-rest-framework/css/bootstrap-responsive.css" rel="stylesheet">
|
<link href="http://tomchristie.github.com/django-rest-framework/css/bootstrap-responsive.css" rel="stylesheet">
|
||||||
|
<link href="http://tomchristie.github.com/django-rest-framework/css/drf-styles.css" rel="stylesheet">
|
||||||
|
|
||||||
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
|
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
|
||||||
<!--[if lt IE 9]>
|
<!--[if lt IE 9]>
|
||||||
|
@ -124,7 +85,7 @@ margin-top: 5px;
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="row-fluid">
|
<div class="row-fluid">
|
||||||
<div class="span3">
|
<div class="span3">
|
||||||
<div class="well affix span3">
|
<div id="table-of-contents" class="well affix span3">
|
||||||
<ul class="nav nav-list side-nav">
|
<ul class="nav nav-list side-nav">
|
||||||
<li class="main"><a href="#serializers">Serializers</a></li>
|
<li class="main"><a href="#serializers">Serializers</a></li>
|
||||||
<li><a href="#declaring-serializers">Declaring Serializers</a></li>
|
<li><a href="#declaring-serializers">Declaring Serializers</a></li>
|
||||||
|
@ -144,7 +105,7 @@ margin-top: 5px;
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="span9">
|
<div id="main-content" class="span9">
|
||||||
<h1 id="serializers">Serializers</h1>
|
<h1 id="serializers">Serializers</h1>
|
||||||
<blockquote>
|
<blockquote>
|
||||||
<p>Expanding the usefulness of the serializers is something that we would
|
<p>Expanding the usefulness of the serializers is something that we would
|
||||||
|
@ -338,9 +299,10 @@ The <code>ModelSerializer</code> class lets you automatically create a Serialize
|
||||||
<!-- Le javascript
|
<!-- Le javascript
|
||||||
================================================== -->
|
================================================== -->
|
||||||
<!-- Placed at the end of the document so the pages load faster -->
|
<!-- Placed at the end of the document so the pages load faster -->
|
||||||
<script src="http://tomchristie.github.com/django-rest-framework/js/jquery.js"></script>
|
<script src="http://tomchristie.github.com/django-rest-framework/js/jquery-1.8.1-min.js"></script>
|
||||||
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-dropdown.js"></script>
|
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-dropdown.js"></script>
|
||||||
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-scrollspy.js"></script>
|
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-scrollspy.js"></script>
|
||||||
|
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-collapse.js"></script>
|
||||||
<script>
|
<script>
|
||||||
//$('.side-nav').scrollspy()
|
//$('.side-nav').scrollspy()
|
||||||
var shiftWindow = function() { scrollBy(0, -50) };
|
var shiftWindow = function() { scrollBy(0, -50) };
|
||||||
|
|
|
@ -8,47 +8,8 @@
|
||||||
|
|
||||||
<!-- Le styles -->
|
<!-- Le styles -->
|
||||||
<link href="http://tomchristie.github.com/django-rest-framework/css/bootstrap.css" rel="stylesheet">
|
<link href="http://tomchristie.github.com/django-rest-framework/css/bootstrap.css" rel="stylesheet">
|
||||||
<style type="text/css">
|
|
||||||
body {
|
|
||||||
padding-top: 60px;
|
|
||||||
padding-bottom: 40px;
|
|
||||||
}
|
|
||||||
.sidebar-nav {
|
|
||||||
padding: 9px 0;
|
|
||||||
}
|
|
||||||
.nav-list li.main {
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
blockquote {
|
|
||||||
font-family: Georgia, serif;
|
|
||||||
font-size: 18px;
|
|
||||||
font-style: italic;
|
|
||||||
margin: 0.25em 0;
|
|
||||||
padding: 0.25em 40px;
|
|
||||||
line-height: 1.45;
|
|
||||||
position: relative;
|
|
||||||
color: #383838;
|
|
||||||
border-left: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
blockquote:before {
|
|
||||||
display: block;
|
|
||||||
content: "\201C";
|
|
||||||
font-size: 80px;
|
|
||||||
position: absolute;
|
|
||||||
left: -10px;
|
|
||||||
top: -20px;
|
|
||||||
color: #7a7a7a;
|
|
||||||
}
|
|
||||||
|
|
||||||
blockquote p:last-child {
|
|
||||||
color: #999999;
|
|
||||||
font-size: 14px;
|
|
||||||
display: block;
|
|
||||||
margin-top: 5px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<link href="http://tomchristie.github.com/django-rest-framework/css/bootstrap-responsive.css" rel="stylesheet">
|
<link href="http://tomchristie.github.com/django-rest-framework/css/bootstrap-responsive.css" rel="stylesheet">
|
||||||
|
<link href="http://tomchristie.github.com/django-rest-framework/css/drf-styles.css" rel="stylesheet">
|
||||||
|
|
||||||
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
|
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
|
||||||
<!--[if lt IE 9]>
|
<!--[if lt IE 9]>
|
||||||
|
@ -124,7 +85,7 @@ margin-top: 5px;
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="row-fluid">
|
<div class="row-fluid">
|
||||||
<div class="span3">
|
<div class="span3">
|
||||||
<div class="well affix span3">
|
<div id="table-of-contents" class="well affix span3">
|
||||||
<ul class="nav nav-list side-nav">
|
<ul class="nav nav-list side-nav">
|
||||||
<li class="main"><a href="#settings">Settings</a></li>
|
<li class="main"><a href="#settings">Settings</a></li>
|
||||||
<li><a href="#accessing-settings">Accessing settings</a></li>
|
<li><a href="#accessing-settings">Accessing settings</a></li>
|
||||||
|
@ -147,7 +108,7 @@ margin-top: 5px;
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="span9">
|
<div id="main-content" class="span9">
|
||||||
<h1 id="settings">Settings</h1>
|
<h1 id="settings">Settings</h1>
|
||||||
<p>Configuration for REST framework is all namespaced inside the <code>API_SETTINGS</code> setting.</p>
|
<p>Configuration for REST framework is all namespaced inside the <code>API_SETTINGS</code> setting.</p>
|
||||||
<p>For example your project's <code>settings.py</code> file might look like this:</p>
|
<p>For example your project's <code>settings.py</code> file might look like this:</p>
|
||||||
|
@ -237,9 +198,10 @@ print api_settings.DEFAULT_AUTHENTICATION
|
||||||
<!-- Le javascript
|
<!-- Le javascript
|
||||||
================================================== -->
|
================================================== -->
|
||||||
<!-- Placed at the end of the document so the pages load faster -->
|
<!-- Placed at the end of the document so the pages load faster -->
|
||||||
<script src="http://tomchristie.github.com/django-rest-framework/js/jquery.js"></script>
|
<script src="http://tomchristie.github.com/django-rest-framework/js/jquery-1.8.1-min.js"></script>
|
||||||
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-dropdown.js"></script>
|
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-dropdown.js"></script>
|
||||||
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-scrollspy.js"></script>
|
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-scrollspy.js"></script>
|
||||||
|
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-collapse.js"></script>
|
||||||
<script>
|
<script>
|
||||||
//$('.side-nav').scrollspy()
|
//$('.side-nav').scrollspy()
|
||||||
var shiftWindow = function() { scrollBy(0, -50) };
|
var shiftWindow = function() { scrollBy(0, -50) };
|
||||||
|
|
|
@ -8,47 +8,8 @@
|
||||||
|
|
||||||
<!-- Le styles -->
|
<!-- Le styles -->
|
||||||
<link href="http://tomchristie.github.com/django-rest-framework/css/bootstrap.css" rel="stylesheet">
|
<link href="http://tomchristie.github.com/django-rest-framework/css/bootstrap.css" rel="stylesheet">
|
||||||
<style type="text/css">
|
|
||||||
body {
|
|
||||||
padding-top: 60px;
|
|
||||||
padding-bottom: 40px;
|
|
||||||
}
|
|
||||||
.sidebar-nav {
|
|
||||||
padding: 9px 0;
|
|
||||||
}
|
|
||||||
.nav-list li.main {
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
blockquote {
|
|
||||||
font-family: Georgia, serif;
|
|
||||||
font-size: 18px;
|
|
||||||
font-style: italic;
|
|
||||||
margin: 0.25em 0;
|
|
||||||
padding: 0.25em 40px;
|
|
||||||
line-height: 1.45;
|
|
||||||
position: relative;
|
|
||||||
color: #383838;
|
|
||||||
border-left: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
blockquote:before {
|
|
||||||
display: block;
|
|
||||||
content: "\201C";
|
|
||||||
font-size: 80px;
|
|
||||||
position: absolute;
|
|
||||||
left: -10px;
|
|
||||||
top: -20px;
|
|
||||||
color: #7a7a7a;
|
|
||||||
}
|
|
||||||
|
|
||||||
blockquote p:last-child {
|
|
||||||
color: #999999;
|
|
||||||
font-size: 14px;
|
|
||||||
display: block;
|
|
||||||
margin-top: 5px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<link href="http://tomchristie.github.com/django-rest-framework/css/bootstrap-responsive.css" rel="stylesheet">
|
<link href="http://tomchristie.github.com/django-rest-framework/css/bootstrap-responsive.css" rel="stylesheet">
|
||||||
|
<link href="http://tomchristie.github.com/django-rest-framework/css/drf-styles.css" rel="stylesheet">
|
||||||
|
|
||||||
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
|
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
|
||||||
<!--[if lt IE 9]>
|
<!--[if lt IE 9]>
|
||||||
|
@ -124,7 +85,7 @@ margin-top: 5px;
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="row-fluid">
|
<div class="row-fluid">
|
||||||
<div class="span3">
|
<div class="span3">
|
||||||
<div class="well affix span3">
|
<div id="table-of-contents" class="well affix span3">
|
||||||
<ul class="nav nav-list side-nav">
|
<ul class="nav nav-list side-nav">
|
||||||
<li class="main"><a href="#status-codes">Status Codes</a></li>
|
<li class="main"><a href="#status-codes">Status Codes</a></li>
|
||||||
<li><a href="#informational---1xx">Informational - 1xx</a></li>
|
<li><a href="#informational---1xx">Informational - 1xx</a></li>
|
||||||
|
@ -137,7 +98,7 @@ margin-top: 5px;
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="span9">
|
<div id="main-content" class="span9">
|
||||||
<h1 id="status-codes">Status Codes</h1>
|
<h1 id="status-codes">Status Codes</h1>
|
||||||
<blockquote>
|
<blockquote>
|
||||||
<p>418 I'm a teapot - Any attempt to brew coffee with a teapot should result in the error code "418 I'm a teapot". The resulting entity body MAY be short and stout.</p>
|
<p>418 I'm a teapot - Any attempt to brew coffee with a teapot should result in the error code "418 I'm a teapot". The resulting entity body MAY be short and stout.</p>
|
||||||
|
@ -220,9 +181,10 @@ HTTP_511_NETWORD_AUTHENTICATION_REQUIRED
|
||||||
<!-- Le javascript
|
<!-- Le javascript
|
||||||
================================================== -->
|
================================================== -->
|
||||||
<!-- Placed at the end of the document so the pages load faster -->
|
<!-- Placed at the end of the document so the pages load faster -->
|
||||||
<script src="http://tomchristie.github.com/django-rest-framework/js/jquery.js"></script>
|
<script src="http://tomchristie.github.com/django-rest-framework/js/jquery-1.8.1-min.js"></script>
|
||||||
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-dropdown.js"></script>
|
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-dropdown.js"></script>
|
||||||
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-scrollspy.js"></script>
|
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-scrollspy.js"></script>
|
||||||
|
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-collapse.js"></script>
|
||||||
<script>
|
<script>
|
||||||
//$('.side-nav').scrollspy()
|
//$('.side-nav').scrollspy()
|
||||||
var shiftWindow = function() { scrollBy(0, -50) };
|
var shiftWindow = function() { scrollBy(0, -50) };
|
||||||
|
|
|
@ -8,47 +8,8 @@
|
||||||
|
|
||||||
<!-- Le styles -->
|
<!-- Le styles -->
|
||||||
<link href="http://tomchristie.github.com/django-rest-framework/css/bootstrap.css" rel="stylesheet">
|
<link href="http://tomchristie.github.com/django-rest-framework/css/bootstrap.css" rel="stylesheet">
|
||||||
<style type="text/css">
|
|
||||||
body {
|
|
||||||
padding-top: 60px;
|
|
||||||
padding-bottom: 40px;
|
|
||||||
}
|
|
||||||
.sidebar-nav {
|
|
||||||
padding: 9px 0;
|
|
||||||
}
|
|
||||||
.nav-list li.main {
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
blockquote {
|
|
||||||
font-family: Georgia, serif;
|
|
||||||
font-size: 18px;
|
|
||||||
font-style: italic;
|
|
||||||
margin: 0.25em 0;
|
|
||||||
padding: 0.25em 40px;
|
|
||||||
line-height: 1.45;
|
|
||||||
position: relative;
|
|
||||||
color: #383838;
|
|
||||||
border-left: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
blockquote:before {
|
|
||||||
display: block;
|
|
||||||
content: "\201C";
|
|
||||||
font-size: 80px;
|
|
||||||
position: absolute;
|
|
||||||
left: -10px;
|
|
||||||
top: -20px;
|
|
||||||
color: #7a7a7a;
|
|
||||||
}
|
|
||||||
|
|
||||||
blockquote p:last-child {
|
|
||||||
color: #999999;
|
|
||||||
font-size: 14px;
|
|
||||||
display: block;
|
|
||||||
margin-top: 5px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<link href="http://tomchristie.github.com/django-rest-framework/css/bootstrap-responsive.css" rel="stylesheet">
|
<link href="http://tomchristie.github.com/django-rest-framework/css/bootstrap-responsive.css" rel="stylesheet">
|
||||||
|
<link href="http://tomchristie.github.com/django-rest-framework/css/drf-styles.css" rel="stylesheet">
|
||||||
|
|
||||||
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
|
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
|
||||||
<!--[if lt IE 9]>
|
<!--[if lt IE 9]>
|
||||||
|
@ -124,14 +85,14 @@ margin-top: 5px;
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="row-fluid">
|
<div class="row-fluid">
|
||||||
<div class="span3">
|
<div class="span3">
|
||||||
<div class="well affix span3">
|
<div id="table-of-contents" class="well affix span3">
|
||||||
<ul class="nav nav-list side-nav">
|
<ul class="nav nav-list side-nav">
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="span9">
|
<div id="main-content" class="span9">
|
||||||
|
|
||||||
</div><!--/span-->
|
</div><!--/span-->
|
||||||
</div><!--/row-->
|
</div><!--/row-->
|
||||||
|
@ -140,9 +101,10 @@ margin-top: 5px;
|
||||||
<!-- Le javascript
|
<!-- Le javascript
|
||||||
================================================== -->
|
================================================== -->
|
||||||
<!-- Placed at the end of the document so the pages load faster -->
|
<!-- Placed at the end of the document so the pages load faster -->
|
||||||
<script src="http://tomchristie.github.com/django-rest-framework/js/jquery.js"></script>
|
<script src="http://tomchristie.github.com/django-rest-framework/js/jquery-1.8.1-min.js"></script>
|
||||||
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-dropdown.js"></script>
|
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-dropdown.js"></script>
|
||||||
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-scrollspy.js"></script>
|
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-scrollspy.js"></script>
|
||||||
|
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-collapse.js"></script>
|
||||||
<script>
|
<script>
|
||||||
//$('.side-nav').scrollspy()
|
//$('.side-nav').scrollspy()
|
||||||
var shiftWindow = function() { scrollBy(0, -50) };
|
var shiftWindow = function() { scrollBy(0, -50) };
|
||||||
|
|
|
@ -8,47 +8,8 @@
|
||||||
|
|
||||||
<!-- Le styles -->
|
<!-- Le styles -->
|
||||||
<link href="http://tomchristie.github.com/django-rest-framework/css/bootstrap.css" rel="stylesheet">
|
<link href="http://tomchristie.github.com/django-rest-framework/css/bootstrap.css" rel="stylesheet">
|
||||||
<style type="text/css">
|
|
||||||
body {
|
|
||||||
padding-top: 60px;
|
|
||||||
padding-bottom: 40px;
|
|
||||||
}
|
|
||||||
.sidebar-nav {
|
|
||||||
padding: 9px 0;
|
|
||||||
}
|
|
||||||
.nav-list li.main {
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
blockquote {
|
|
||||||
font-family: Georgia, serif;
|
|
||||||
font-size: 18px;
|
|
||||||
font-style: italic;
|
|
||||||
margin: 0.25em 0;
|
|
||||||
padding: 0.25em 40px;
|
|
||||||
line-height: 1.45;
|
|
||||||
position: relative;
|
|
||||||
color: #383838;
|
|
||||||
border-left: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
blockquote:before {
|
|
||||||
display: block;
|
|
||||||
content: "\201C";
|
|
||||||
font-size: 80px;
|
|
||||||
position: absolute;
|
|
||||||
left: -10px;
|
|
||||||
top: -20px;
|
|
||||||
color: #7a7a7a;
|
|
||||||
}
|
|
||||||
|
|
||||||
blockquote p:last-child {
|
|
||||||
color: #999999;
|
|
||||||
font-size: 14px;
|
|
||||||
display: block;
|
|
||||||
margin-top: 5px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<link href="http://tomchristie.github.com/django-rest-framework/css/bootstrap-responsive.css" rel="stylesheet">
|
<link href="http://tomchristie.github.com/django-rest-framework/css/bootstrap-responsive.css" rel="stylesheet">
|
||||||
|
<link href="http://tomchristie.github.com/django-rest-framework/css/drf-styles.css" rel="stylesheet">
|
||||||
|
|
||||||
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
|
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
|
||||||
<!--[if lt IE 9]>
|
<!--[if lt IE 9]>
|
||||||
|
@ -124,7 +85,7 @@ margin-top: 5px;
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="row-fluid">
|
<div class="row-fluid">
|
||||||
<div class="span3">
|
<div class="span3">
|
||||||
<div class="well affix span3">
|
<div id="table-of-contents" class="well affix span3">
|
||||||
<ul class="nav nav-list side-nav">
|
<ul class="nav nav-list side-nav">
|
||||||
<li class="main"><a href="#views">Views</a></li>
|
<li class="main"><a href="#views">Views</a></li>
|
||||||
<li><a href="#apiview">APIView</a></li>
|
<li><a href="#apiview">APIView</a></li>
|
||||||
|
@ -142,7 +103,7 @@ margin-top: 5px;
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="span9">
|
<div id="main-content" class="span9">
|
||||||
<blockquote>
|
<blockquote>
|
||||||
<p>Django's class based views are a welcome departure from the old-style views.</p>
|
<p>Django's class based views are a welcome departure from the old-style views.</p>
|
||||||
<p>— <a href="http://reinout.vanrees.org/weblog/2011/08/24/class-based-views-usage.html">Reinout van Rees</a></p>
|
<p>— <a href="http://reinout.vanrees.org/weblog/2011/08/24/class-based-views-usage.html">Reinout van Rees</a></p>
|
||||||
|
@ -175,9 +136,10 @@ margin-top: 5px;
|
||||||
<!-- Le javascript
|
<!-- Le javascript
|
||||||
================================================== -->
|
================================================== -->
|
||||||
<!-- Placed at the end of the document so the pages load faster -->
|
<!-- Placed at the end of the document so the pages load faster -->
|
||||||
<script src="http://tomchristie.github.com/django-rest-framework/js/jquery.js"></script>
|
<script src="http://tomchristie.github.com/django-rest-framework/js/jquery-1.8.1-min.js"></script>
|
||||||
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-dropdown.js"></script>
|
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-dropdown.js"></script>
|
||||||
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-scrollspy.js"></script>
|
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-scrollspy.js"></script>
|
||||||
|
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-collapse.js"></script>
|
||||||
<script>
|
<script>
|
||||||
//$('.side-nav').scrollspy()
|
//$('.side-nav').scrollspy()
|
||||||
var shiftWindow = function() { scrollBy(0, -50) };
|
var shiftWindow = function() { scrollBy(0, -50) };
|
||||||
|
|
30
css/bootstrap-responsive.css
vendored
30
css/bootstrap-responsive.css
vendored
|
@ -1,5 +1,5 @@
|
||||||
/*!
|
/*!
|
||||||
* Bootstrap Responsive v2.1.0
|
* Bootstrap Responsive v2.1.1
|
||||||
*
|
*
|
||||||
* Copyright 2012 Twitter, Inc
|
* Copyright 2012 Twitter, Inc
|
||||||
* Licensed under the Apache License v2.0
|
* Licensed under the Apache License v2.0
|
||||||
|
@ -107,6 +107,7 @@
|
||||||
}
|
}
|
||||||
[class*="span"] {
|
[class*="span"] {
|
||||||
float: left;
|
float: left;
|
||||||
|
min-height: 1px;
|
||||||
margin-left: 30px;
|
margin-left: 30px;
|
||||||
}
|
}
|
||||||
.container,
|
.container,
|
||||||
|
@ -453,6 +454,7 @@
|
||||||
}
|
}
|
||||||
[class*="span"] {
|
[class*="span"] {
|
||||||
float: left;
|
float: left;
|
||||||
|
min-height: 1px;
|
||||||
margin-left: 20px;
|
margin-left: 20px;
|
||||||
}
|
}
|
||||||
.container,
|
.container,
|
||||||
|
@ -780,7 +782,8 @@
|
||||||
padding-left: 20px;
|
padding-left: 20px;
|
||||||
}
|
}
|
||||||
.navbar-fixed-top,
|
.navbar-fixed-top,
|
||||||
.navbar-fixed-bottom {
|
.navbar-fixed-bottom,
|
||||||
|
.navbar-static-top {
|
||||||
margin-right: -20px;
|
margin-right: -20px;
|
||||||
margin-left: -20px;
|
margin-left: -20px;
|
||||||
}
|
}
|
||||||
|
@ -814,8 +817,11 @@
|
||||||
.row-fluid [class*="span"] {
|
.row-fluid [class*="span"] {
|
||||||
display: block;
|
display: block;
|
||||||
float: none;
|
float: none;
|
||||||
width: auto;
|
width: 100%;
|
||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
|
-webkit-box-sizing: border-box;
|
||||||
|
-moz-box-sizing: border-box;
|
||||||
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
.span12,
|
.span12,
|
||||||
.row-fluid .span12 {
|
.row-fluid .span12 {
|
||||||
|
@ -845,6 +851,9 @@
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: auto;
|
width: auto;
|
||||||
}
|
}
|
||||||
|
.controls-row [class*="span"] + [class*="span"] {
|
||||||
|
margin-left: 0;
|
||||||
|
}
|
||||||
.modal {
|
.modal {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 20px;
|
top: 20px;
|
||||||
|
@ -870,7 +879,7 @@
|
||||||
input[type="radio"] {
|
input[type="radio"] {
|
||||||
border: 1px solid #ccc;
|
border: 1px solid #ccc;
|
||||||
}
|
}
|
||||||
.form-horizontal .control-group > label {
|
.form-horizontal .control-label {
|
||||||
float: none;
|
float: none;
|
||||||
width: auto;
|
width: auto;
|
||||||
padding-top: 0;
|
padding-top: 0;
|
||||||
|
@ -944,14 +953,14 @@
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
.nav-collapse .nav .nav-header {
|
.nav-collapse .nav .nav-header {
|
||||||
color: #555555;
|
color: #777777;
|
||||||
text-shadow: none;
|
text-shadow: none;
|
||||||
}
|
}
|
||||||
.nav-collapse .nav > li > a,
|
.nav-collapse .nav > li > a,
|
||||||
.nav-collapse .dropdown-menu a {
|
.nav-collapse .dropdown-menu a {
|
||||||
padding: 9px 15px;
|
padding: 9px 15px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
color: #555555;
|
color: #777777;
|
||||||
-webkit-border-radius: 3px;
|
-webkit-border-radius: 3px;
|
||||||
-moz-border-radius: 3px;
|
-moz-border-radius: 3px;
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
|
@ -1003,6 +1012,10 @@
|
||||||
.nav-collapse .dropdown-menu .divider {
|
.nav-collapse .dropdown-menu .divider {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
.nav-collapse .nav > li > .dropdown-menu:before,
|
||||||
|
.nav-collapse .nav > li > .dropdown-menu:after {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
.nav-collapse .navbar-form,
|
.nav-collapse .navbar-form,
|
||||||
.nav-collapse .navbar-search {
|
.nav-collapse .navbar-search {
|
||||||
float: none;
|
float: none;
|
||||||
|
@ -1014,6 +1027,11 @@
|
||||||
-moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);
|
-moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);
|
||||||
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);
|
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);
|
||||||
}
|
}
|
||||||
|
.navbar-inverse .nav-collapse .navbar-form,
|
||||||
|
.navbar-inverse .nav-collapse .navbar-search {
|
||||||
|
border-top-color: #111111;
|
||||||
|
border-bottom-color: #111111;
|
||||||
|
}
|
||||||
.navbar .nav-collapse .nav.pull-right {
|
.navbar .nav-collapse .nav.pull-right {
|
||||||
float: none;
|
float: none;
|
||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
|
|
318
css/bootstrap.css
vendored
318
css/bootstrap.css
vendored
|
@ -1,5 +1,5 @@
|
||||||
/*!
|
/*!
|
||||||
* Bootstrap v2.1.0
|
* Bootstrap v2.1.1
|
||||||
*
|
*
|
||||||
* Copyright 2012 Twitter, Inc
|
* Copyright 2012 Twitter, Inc
|
||||||
* Licensed under the Apache License v2.0
|
* Licensed under the Apache License v2.0
|
||||||
|
@ -67,6 +67,7 @@ sub {
|
||||||
}
|
}
|
||||||
|
|
||||||
img {
|
img {
|
||||||
|
width: auto\9;
|
||||||
height: auto;
|
height: auto;
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
|
@ -215,6 +216,7 @@ a:hover {
|
||||||
|
|
||||||
[class*="span"] {
|
[class*="span"] {
|
||||||
float: left;
|
float: left;
|
||||||
|
min-height: 1px;
|
||||||
margin-left: 20px;
|
margin-left: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -583,7 +585,7 @@ p {
|
||||||
|
|
||||||
.lead {
|
.lead {
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
font-size: 20px;
|
font-size: 21px;
|
||||||
font-weight: 200;
|
font-weight: 200;
|
||||||
line-height: 30px;
|
line-height: 30px;
|
||||||
}
|
}
|
||||||
|
@ -608,6 +610,22 @@ cite {
|
||||||
color: #999999;
|
color: #999999;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.text-warning {
|
||||||
|
color: #c09853;
|
||||||
|
}
|
||||||
|
|
||||||
|
.text-error {
|
||||||
|
color: #b94a48;
|
||||||
|
}
|
||||||
|
|
||||||
|
.text-info {
|
||||||
|
color: #3a87ad;
|
||||||
|
}
|
||||||
|
|
||||||
|
.text-success {
|
||||||
|
color: #468847;
|
||||||
|
}
|
||||||
|
|
||||||
h1,
|
h1,
|
||||||
h2,
|
h2,
|
||||||
h3,
|
h3,
|
||||||
|
@ -725,9 +743,24 @@ dd {
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.dl-horizontal {
|
||||||
|
*zoom: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dl-horizontal:before,
|
||||||
|
.dl-horizontal:after {
|
||||||
|
display: table;
|
||||||
|
line-height: 0;
|
||||||
|
content: "";
|
||||||
|
}
|
||||||
|
|
||||||
|
.dl-horizontal:after {
|
||||||
|
clear: both;
|
||||||
|
}
|
||||||
|
|
||||||
.dl-horizontal dt {
|
.dl-horizontal dt {
|
||||||
float: left;
|
float: left;
|
||||||
width: 120px;
|
width: 160px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
clear: left;
|
clear: left;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
|
@ -736,7 +769,7 @@ dd {
|
||||||
}
|
}
|
||||||
|
|
||||||
.dl-horizontal dd {
|
.dl-horizontal dd {
|
||||||
margin-left: 130px;
|
margin-left: 180px;
|
||||||
}
|
}
|
||||||
|
|
||||||
hr {
|
hr {
|
||||||
|
@ -945,8 +978,9 @@ input[type="color"],
|
||||||
}
|
}
|
||||||
|
|
||||||
input,
|
input,
|
||||||
textarea {
|
textarea,
|
||||||
width: 210px;
|
.uneditable-input {
|
||||||
|
width: 206px;
|
||||||
}
|
}
|
||||||
|
|
||||||
textarea {
|
textarea {
|
||||||
|
@ -1039,7 +1073,7 @@ input[type="file"] {
|
||||||
select {
|
select {
|
||||||
width: 220px;
|
width: 220px;
|
||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
border: 1px solid #bbb;
|
border: 1px solid #cccccc;
|
||||||
}
|
}
|
||||||
|
|
||||||
select[multiple],
|
select[multiple],
|
||||||
|
@ -1301,14 +1335,17 @@ input[type="checkbox"][readonly] {
|
||||||
.control-group.warning select,
|
.control-group.warning select,
|
||||||
.control-group.warning textarea {
|
.control-group.warning textarea {
|
||||||
color: #c09853;
|
color: #c09853;
|
||||||
|
}
|
||||||
|
|
||||||
|
.control-group.warning input,
|
||||||
|
.control-group.warning select,
|
||||||
|
.control-group.warning textarea {
|
||||||
border-color: #c09853;
|
border-color: #c09853;
|
||||||
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
|
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
|
||||||
-moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
|
-moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
|
||||||
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
|
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
|
||||||
}
|
}
|
||||||
|
|
||||||
.control-group.warning .checkbox:focus,
|
|
||||||
.control-group.warning .radio:focus,
|
|
||||||
.control-group.warning input:focus,
|
.control-group.warning input:focus,
|
||||||
.control-group.warning select:focus,
|
.control-group.warning select:focus,
|
||||||
.control-group.warning textarea:focus {
|
.control-group.warning textarea:focus {
|
||||||
|
@ -1337,14 +1374,17 @@ input[type="checkbox"][readonly] {
|
||||||
.control-group.error select,
|
.control-group.error select,
|
||||||
.control-group.error textarea {
|
.control-group.error textarea {
|
||||||
color: #b94a48;
|
color: #b94a48;
|
||||||
|
}
|
||||||
|
|
||||||
|
.control-group.error input,
|
||||||
|
.control-group.error select,
|
||||||
|
.control-group.error textarea {
|
||||||
border-color: #b94a48;
|
border-color: #b94a48;
|
||||||
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
|
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
|
||||||
-moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
|
-moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
|
||||||
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
|
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
|
||||||
}
|
}
|
||||||
|
|
||||||
.control-group.error .checkbox:focus,
|
|
||||||
.control-group.error .radio:focus,
|
|
||||||
.control-group.error input:focus,
|
.control-group.error input:focus,
|
||||||
.control-group.error select:focus,
|
.control-group.error select:focus,
|
||||||
.control-group.error textarea:focus {
|
.control-group.error textarea:focus {
|
||||||
|
@ -1373,14 +1413,17 @@ input[type="checkbox"][readonly] {
|
||||||
.control-group.success select,
|
.control-group.success select,
|
||||||
.control-group.success textarea {
|
.control-group.success textarea {
|
||||||
color: #468847;
|
color: #468847;
|
||||||
|
}
|
||||||
|
|
||||||
|
.control-group.success input,
|
||||||
|
.control-group.success select,
|
||||||
|
.control-group.success textarea {
|
||||||
border-color: #468847;
|
border-color: #468847;
|
||||||
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
|
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
|
||||||
-moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
|
-moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
|
||||||
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
|
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
|
||||||
}
|
}
|
||||||
|
|
||||||
.control-group.success .checkbox:focus,
|
|
||||||
.control-group.success .radio:focus,
|
|
||||||
.control-group.success input:focus,
|
.control-group.success input:focus,
|
||||||
.control-group.success select:focus,
|
.control-group.success select:focus,
|
||||||
.control-group.success textarea:focus {
|
.control-group.success textarea:focus {
|
||||||
|
@ -1397,6 +1440,45 @@ input[type="checkbox"][readonly] {
|
||||||
border-color: #468847;
|
border-color: #468847;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.control-group.info > label,
|
||||||
|
.control-group.info .help-block,
|
||||||
|
.control-group.info .help-inline {
|
||||||
|
color: #3a87ad;
|
||||||
|
}
|
||||||
|
|
||||||
|
.control-group.info .checkbox,
|
||||||
|
.control-group.info .radio,
|
||||||
|
.control-group.info input,
|
||||||
|
.control-group.info select,
|
||||||
|
.control-group.info textarea {
|
||||||
|
color: #3a87ad;
|
||||||
|
}
|
||||||
|
|
||||||
|
.control-group.info input,
|
||||||
|
.control-group.info select,
|
||||||
|
.control-group.info textarea {
|
||||||
|
border-color: #3a87ad;
|
||||||
|
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
|
||||||
|
-moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
|
||||||
|
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
|
||||||
|
}
|
||||||
|
|
||||||
|
.control-group.info input:focus,
|
||||||
|
.control-group.info select:focus,
|
||||||
|
.control-group.info textarea:focus {
|
||||||
|
border-color: #2d6987;
|
||||||
|
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3;
|
||||||
|
-moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3;
|
||||||
|
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3;
|
||||||
|
}
|
||||||
|
|
||||||
|
.control-group.info .input-prepend .add-on,
|
||||||
|
.control-group.info .input-append .add-on {
|
||||||
|
color: #3a87ad;
|
||||||
|
background-color: #d9edf7;
|
||||||
|
border-color: #3a87ad;
|
||||||
|
}
|
||||||
|
|
||||||
input:focus:required:invalid,
|
input:focus:required:invalid,
|
||||||
textarea:focus:required:invalid,
|
textarea:focus:required:invalid,
|
||||||
select:focus:required:invalid {
|
select:focus:required:invalid {
|
||||||
|
@ -1503,7 +1585,6 @@ select:focus:required:invalid:focus {
|
||||||
.input-prepend .add-on,
|
.input-prepend .add-on,
|
||||||
.input-append .btn,
|
.input-append .btn,
|
||||||
.input-prepend .btn {
|
.input-prepend .btn {
|
||||||
margin-left: -1px;
|
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
-webkit-border-radius: 0;
|
-webkit-border-radius: 0;
|
||||||
-moz-border-radius: 0;
|
-moz-border-radius: 0;
|
||||||
|
@ -1536,6 +1617,11 @@ select:focus:required:invalid:focus {
|
||||||
border-radius: 3px 0 0 3px;
|
border-radius: 3px 0 0 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.input-append .add-on,
|
||||||
|
.input-append .btn {
|
||||||
|
margin-left: -1px;
|
||||||
|
}
|
||||||
|
|
||||||
.input-append .add-on:last-child,
|
.input-append .add-on:last-child,
|
||||||
.input-append .btn:last-child {
|
.input-append .btn:last-child {
|
||||||
-webkit-border-radius: 0 3px 3px 0;
|
-webkit-border-radius: 0 3px 3px 0;
|
||||||
|
@ -1706,7 +1792,7 @@ legend + .control-group {
|
||||||
|
|
||||||
.form-horizontal .control-label {
|
.form-horizontal .control-label {
|
||||||
float: left;
|
float: left;
|
||||||
width: 140px;
|
width: 160px;
|
||||||
padding-top: 5px;
|
padding-top: 5px;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
|
@ -1714,21 +1800,26 @@ legend + .control-group {
|
||||||
.form-horizontal .controls {
|
.form-horizontal .controls {
|
||||||
*display: inline-block;
|
*display: inline-block;
|
||||||
*padding-left: 20px;
|
*padding-left: 20px;
|
||||||
margin-left: 160px;
|
margin-left: 180px;
|
||||||
*margin-left: 0;
|
*margin-left: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.form-horizontal .controls:first-child {
|
.form-horizontal .controls:first-child {
|
||||||
*padding-left: 160px;
|
*padding-left: 180px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.form-horizontal .help-block {
|
.form-horizontal .help-block {
|
||||||
margin-top: 10px;
|
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.form-horizontal input + .help-block,
|
||||||
|
.form-horizontal select + .help-block,
|
||||||
|
.form-horizontal textarea + .help-block {
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
.form-horizontal .form-actions {
|
.form-horizontal .form-actions {
|
||||||
padding-left: 160px;
|
padding-left: 180px;
|
||||||
}
|
}
|
||||||
|
|
||||||
table {
|
table {
|
||||||
|
@ -1853,7 +1944,7 @@ table {
|
||||||
.table-bordered colgroup + tbody tr:first-child td:last-child {
|
.table-bordered colgroup + tbody tr:first-child td:last-child {
|
||||||
-webkit-border-top-right-radius: 4px;
|
-webkit-border-top-right-radius: 4px;
|
||||||
border-top-right-radius: 4px;
|
border-top-right-radius: 4px;
|
||||||
-moz-border-right-topleft: 4px;
|
-moz-border-radius-topleft: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.table-striped tbody tr:nth-child(odd) td,
|
.table-striped tbody tr:nth-child(odd) td,
|
||||||
|
@ -1873,145 +1964,145 @@ table [class*=span],
|
||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
table .span1 {
|
.table .span1 {
|
||||||
float: none;
|
float: none;
|
||||||
width: 44px;
|
width: 44px;
|
||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
table .span2 {
|
.table .span2 {
|
||||||
float: none;
|
float: none;
|
||||||
width: 124px;
|
width: 124px;
|
||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
table .span3 {
|
.table .span3 {
|
||||||
float: none;
|
float: none;
|
||||||
width: 204px;
|
width: 204px;
|
||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
table .span4 {
|
.table .span4 {
|
||||||
float: none;
|
float: none;
|
||||||
width: 284px;
|
width: 284px;
|
||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
table .span5 {
|
.table .span5 {
|
||||||
float: none;
|
float: none;
|
||||||
width: 364px;
|
width: 364px;
|
||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
table .span6 {
|
.table .span6 {
|
||||||
float: none;
|
float: none;
|
||||||
width: 444px;
|
width: 444px;
|
||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
table .span7 {
|
.table .span7 {
|
||||||
float: none;
|
float: none;
|
||||||
width: 524px;
|
width: 524px;
|
||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
table .span8 {
|
.table .span8 {
|
||||||
float: none;
|
float: none;
|
||||||
width: 604px;
|
width: 604px;
|
||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
table .span9 {
|
.table .span9 {
|
||||||
float: none;
|
float: none;
|
||||||
width: 684px;
|
width: 684px;
|
||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
table .span10 {
|
.table .span10 {
|
||||||
float: none;
|
float: none;
|
||||||
width: 764px;
|
width: 764px;
|
||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
table .span11 {
|
.table .span11 {
|
||||||
float: none;
|
float: none;
|
||||||
width: 844px;
|
width: 844px;
|
||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
table .span12 {
|
.table .span12 {
|
||||||
float: none;
|
float: none;
|
||||||
width: 924px;
|
width: 924px;
|
||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
table .span13 {
|
.table .span13 {
|
||||||
float: none;
|
float: none;
|
||||||
width: 1004px;
|
width: 1004px;
|
||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
table .span14 {
|
.table .span14 {
|
||||||
float: none;
|
float: none;
|
||||||
width: 1084px;
|
width: 1084px;
|
||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
table .span15 {
|
.table .span15 {
|
||||||
float: none;
|
float: none;
|
||||||
width: 1164px;
|
width: 1164px;
|
||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
table .span16 {
|
.table .span16 {
|
||||||
float: none;
|
float: none;
|
||||||
width: 1244px;
|
width: 1244px;
|
||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
table .span17 {
|
.table .span17 {
|
||||||
float: none;
|
float: none;
|
||||||
width: 1324px;
|
width: 1324px;
|
||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
table .span18 {
|
.table .span18 {
|
||||||
float: none;
|
float: none;
|
||||||
width: 1404px;
|
width: 1404px;
|
||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
table .span19 {
|
.table .span19 {
|
||||||
float: none;
|
float: none;
|
||||||
width: 1484px;
|
width: 1484px;
|
||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
table .span20 {
|
.table .span20 {
|
||||||
float: none;
|
float: none;
|
||||||
width: 1564px;
|
width: 1564px;
|
||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
table .span21 {
|
.table .span21 {
|
||||||
float: none;
|
float: none;
|
||||||
width: 1644px;
|
width: 1644px;
|
||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
table .span22 {
|
.table .span22 {
|
||||||
float: none;
|
float: none;
|
||||||
width: 1724px;
|
width: 1724px;
|
||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
table .span23 {
|
.table .span23 {
|
||||||
float: none;
|
float: none;
|
||||||
width: 1804px;
|
width: 1804px;
|
||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
table .span24 {
|
.table .span24 {
|
||||||
float: none;
|
float: none;
|
||||||
width: 1884px;
|
width: 1884px;
|
||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
|
@ -2025,10 +2116,30 @@ table .span24 {
|
||||||
background-color: #f2dede;
|
background-color: #f2dede;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.table tbody tr.warning td {
|
||||||
|
background-color: #fcf8e3;
|
||||||
|
}
|
||||||
|
|
||||||
.table tbody tr.info td {
|
.table tbody tr.info td {
|
||||||
background-color: #d9edf7;
|
background-color: #d9edf7;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.table-hover tbody tr.success:hover td {
|
||||||
|
background-color: #d0e9c6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table-hover tbody tr.error:hover td {
|
||||||
|
background-color: #ebcccc;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table-hover tbody tr.warning:hover td {
|
||||||
|
background-color: #faf2cc;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table-hover tbody tr.info:hover td {
|
||||||
|
background-color: #c4e3f3;
|
||||||
|
}
|
||||||
|
|
||||||
[class^="icon-"],
|
[class^="icon-"],
|
||||||
[class*=" icon-"] {
|
[class*=" icon-"] {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
@ -2046,8 +2157,14 @@ table .span24 {
|
||||||
/* White icons with optional class, or on hover/active states of certain elements */
|
/* White icons with optional class, or on hover/active states of certain elements */
|
||||||
|
|
||||||
.icon-white,
|
.icon-white,
|
||||||
.nav > .active > a > [class^="icon-"],
|
.nav-tabs > .active > a > [class^="icon-"],
|
||||||
.nav > .active > a > [class*=" icon-"],
|
.nav-tabs > .active > a > [class*=" icon-"],
|
||||||
|
.nav-pills > .active > a > [class^="icon-"],
|
||||||
|
.nav-pills > .active > a > [class*=" icon-"],
|
||||||
|
.nav-list > .active > a > [class^="icon-"],
|
||||||
|
.nav-list > .active > a > [class*=" icon-"],
|
||||||
|
.navbar-inverse .nav > .active > a > [class^="icon-"],
|
||||||
|
.navbar-inverse .nav > .active > a > [class*=" icon-"],
|
||||||
.dropdown-menu > li > a:hover > [class^="icon-"],
|
.dropdown-menu > li > a:hover > [class^="icon-"],
|
||||||
.dropdown-menu > li > a:hover > [class*=" icon-"],
|
.dropdown-menu > li > a:hover > [class*=" icon-"],
|
||||||
.dropdown-menu > .active > a > [class^="icon-"],
|
.dropdown-menu > .active > a > [class^="icon-"],
|
||||||
|
@ -2759,7 +2876,7 @@ table .span24 {
|
||||||
.navbar-fixed-bottom .dropdown .caret {
|
.navbar-fixed-bottom .dropdown .caret {
|
||||||
border-top: 0;
|
border-top: 0;
|
||||||
border-bottom: 4px solid #000000;
|
border-bottom: 4px solid #000000;
|
||||||
content: "\2191";
|
content: "";
|
||||||
}
|
}
|
||||||
|
|
||||||
.dropup .dropdown-menu,
|
.dropup .dropdown-menu,
|
||||||
|
@ -2783,7 +2900,7 @@ table .span24 {
|
||||||
border-radius: 0 6px 6px 6px;
|
border-radius: 0 6px 6px 6px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dropdown-submenu:hover .dropdown-menu {
|
.dropdown-submenu:hover > .dropdown-menu {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2866,7 +2983,6 @@ table .span24 {
|
||||||
position: relative;
|
position: relative;
|
||||||
height: 0;
|
height: 0;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
overflow: visible \9;
|
|
||||||
-webkit-transition: height 0.35s ease;
|
-webkit-transition: height 0.35s ease;
|
||||||
-moz-transition: height 0.35s ease;
|
-moz-transition: height 0.35s ease;
|
||||||
-o-transition: height 0.35s ease;
|
-o-transition: height 0.35s ease;
|
||||||
|
@ -3030,7 +3146,7 @@ button.close {
|
||||||
.btn-mini {
|
.btn-mini {
|
||||||
padding: 2px 6px;
|
padding: 2px 6px;
|
||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
line-height: 16px;
|
line-height: 17px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-block {
|
.btn-block {
|
||||||
|
@ -3047,6 +3163,12 @@ button.close {
|
||||||
margin-top: 5px;
|
margin-top: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
input[type="submit"].btn-block,
|
||||||
|
input[type="reset"].btn-block,
|
||||||
|
input[type="button"].btn-block {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
.btn-primary.active,
|
.btn-primary.active,
|
||||||
.btn-warning.active,
|
.btn-warning.active,
|
||||||
.btn-danger.active,
|
.btn-danger.active,
|
||||||
|
@ -3284,7 +3406,8 @@ input[type="submit"].btn.btn-mini {
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-link,
|
.btn-link,
|
||||||
.btn-link:active {
|
.btn-link:active,
|
||||||
|
.btn-link[disabled] {
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
background-image: none;
|
background-image: none;
|
||||||
-webkit-box-shadow: none;
|
-webkit-box-shadow: none;
|
||||||
|
@ -3307,11 +3430,17 @@ input[type="submit"].btn.btn-mini {
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.btn-link[disabled]:hover {
|
||||||
|
color: #333333;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
.btn-group {
|
.btn-group {
|
||||||
position: relative;
|
position: relative;
|
||||||
*margin-left: .3em;
|
*margin-left: .3em;
|
||||||
font-size: 0;
|
font-size: 0;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-group:first-child {
|
.btn-group:first-child {
|
||||||
|
@ -4018,7 +4147,7 @@ input[type="submit"].btn.btn-mini {
|
||||||
*z-index: 2;
|
*z-index: 2;
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
overflow: visible;
|
overflow: visible;
|
||||||
color: #555555;
|
color: #777777;
|
||||||
}
|
}
|
||||||
|
|
||||||
.navbar-inner {
|
.navbar-inner {
|
||||||
|
@ -4037,11 +4166,23 @@ input[type="submit"].btn.btn-mini {
|
||||||
-moz-border-radius: 4px;
|
-moz-border-radius: 4px;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
filter: progid:dximagetransform.microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff2f2f2', GradientType=0);
|
filter: progid:dximagetransform.microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff2f2f2', GradientType=0);
|
||||||
|
*zoom: 1;
|
||||||
-webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065);
|
-webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065);
|
||||||
-moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065);
|
-moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065);
|
||||||
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065);
|
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.navbar-inner:before,
|
||||||
|
.navbar-inner:after {
|
||||||
|
display: table;
|
||||||
|
line-height: 0;
|
||||||
|
content: "";
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbar-inner:after {
|
||||||
|
clear: both;
|
||||||
|
}
|
||||||
|
|
||||||
.navbar .container {
|
.navbar .container {
|
||||||
width: auto;
|
width: auto;
|
||||||
}
|
}
|
||||||
|
@ -4057,7 +4198,7 @@ input[type="submit"].btn.btn-mini {
|
||||||
margin-left: -20px;
|
margin-left: -20px;
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
font-weight: 200;
|
font-weight: 200;
|
||||||
color: #555555;
|
color: #777777;
|
||||||
text-shadow: 0 1px 0 #ffffff;
|
text-shadow: 0 1px 0 #ffffff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4071,7 +4212,7 @@ input[type="submit"].btn.btn-mini {
|
||||||
}
|
}
|
||||||
|
|
||||||
.navbar-link {
|
.navbar-link {
|
||||||
color: #555555;
|
color: #777777;
|
||||||
}
|
}
|
||||||
|
|
||||||
.navbar-link:hover {
|
.navbar-link:hover {
|
||||||
|
@ -4087,11 +4228,13 @@ input[type="submit"].btn.btn-mini {
|
||||||
|
|
||||||
.navbar .btn,
|
.navbar .btn,
|
||||||
.navbar .btn-group {
|
.navbar .btn-group {
|
||||||
margin-top: 6px;
|
margin-top: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.navbar .btn-group .btn {
|
.navbar .btn-group .btn,
|
||||||
margin: 0;
|
.navbar .input-prepend .btn,
|
||||||
|
.navbar .input-append .btn {
|
||||||
|
margin-top: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.navbar-form {
|
.navbar-form {
|
||||||
|
@ -4182,9 +4325,12 @@ input[type="submit"].btn.btn-mini {
|
||||||
}
|
}
|
||||||
|
|
||||||
.navbar-fixed-top .navbar-inner,
|
.navbar-fixed-top .navbar-inner,
|
||||||
.navbar-fixed-bottom .navbar-inner,
|
|
||||||
.navbar-static-top .navbar-inner {
|
.navbar-static-top .navbar-inner {
|
||||||
border: 0;
|
border-width: 0 0 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbar-fixed-bottom .navbar-inner {
|
||||||
|
border-width: 1px 0 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.navbar-fixed-top .navbar-inner,
|
.navbar-fixed-top .navbar-inner,
|
||||||
|
@ -4233,6 +4379,7 @@ input[type="submit"].btn.btn-mini {
|
||||||
|
|
||||||
.navbar .nav.pull-right {
|
.navbar .nav.pull-right {
|
||||||
float: right;
|
float: right;
|
||||||
|
margin-right: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.navbar .nav > li {
|
.navbar .nav > li {
|
||||||
|
@ -4242,7 +4389,7 @@ input[type="submit"].btn.btn-mini {
|
||||||
.navbar .nav > li > a {
|
.navbar .nav > li > a {
|
||||||
float: none;
|
float: none;
|
||||||
padding: 10px 15px 10px;
|
padding: 10px 15px 10px;
|
||||||
color: #555555;
|
color: #777777;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
text-shadow: 0 1px 0 #ffffff;
|
text-shadow: 0 1px 0 #ffffff;
|
||||||
}
|
}
|
||||||
|
@ -4372,8 +4519,8 @@ input[type="submit"].btn.btn-mini {
|
||||||
}
|
}
|
||||||
|
|
||||||
.navbar .nav li.dropdown > .dropdown-toggle .caret {
|
.navbar .nav li.dropdown > .dropdown-toggle .caret {
|
||||||
border-top-color: #555555;
|
border-top-color: #777777;
|
||||||
border-bottom-color: #555555;
|
border-bottom-color: #777777;
|
||||||
}
|
}
|
||||||
|
|
||||||
.navbar .nav li.dropdown.open > .dropdown-toggle .caret,
|
.navbar .nav li.dropdown.open > .dropdown-toggle .caret,
|
||||||
|
@ -4599,12 +4746,12 @@ input[type="submit"].btn.btn-mini {
|
||||||
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
|
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
|
||||||
}
|
}
|
||||||
|
|
||||||
.pagination li {
|
.pagination ul > li {
|
||||||
display: inline;
|
display: inline;
|
||||||
}
|
}
|
||||||
|
|
||||||
.pagination a,
|
.pagination ul > li > a,
|
||||||
.pagination span {
|
.pagination ul > li > span {
|
||||||
float: left;
|
float: left;
|
||||||
padding: 0 14px;
|
padding: 0 14px;
|
||||||
line-height: 38px;
|
line-height: 38px;
|
||||||
|
@ -4614,36 +4761,36 @@ input[type="submit"].btn.btn-mini {
|
||||||
border-left-width: 0;
|
border-left-width: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.pagination a:hover,
|
.pagination ul > li > a:hover,
|
||||||
.pagination .active a,
|
.pagination ul > .active > a,
|
||||||
.pagination .active span {
|
.pagination ul > .active > span {
|
||||||
background-color: #f5f5f5;
|
background-color: #f5f5f5;
|
||||||
}
|
}
|
||||||
|
|
||||||
.pagination .active a,
|
.pagination ul > .active > a,
|
||||||
.pagination .active span {
|
.pagination ul > .active > span {
|
||||||
color: #999999;
|
color: #999999;
|
||||||
cursor: default;
|
cursor: default;
|
||||||
}
|
}
|
||||||
|
|
||||||
.pagination .disabled span,
|
.pagination ul > .disabled > span,
|
||||||
.pagination .disabled a,
|
.pagination ul > .disabled > a,
|
||||||
.pagination .disabled a:hover {
|
.pagination ul > .disabled > a:hover {
|
||||||
color: #999999;
|
color: #999999;
|
||||||
cursor: default;
|
cursor: default;
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
.pagination li:first-child a,
|
.pagination ul > li:first-child > a,
|
||||||
.pagination li:first-child span {
|
.pagination ul > li:first-child > span {
|
||||||
border-left-width: 1px;
|
border-left-width: 1px;
|
||||||
-webkit-border-radius: 3px 0 0 3px;
|
-webkit-border-radius: 3px 0 0 3px;
|
||||||
-moz-border-radius: 3px 0 0 3px;
|
-moz-border-radius: 3px 0 0 3px;
|
||||||
border-radius: 3px 0 0 3px;
|
border-radius: 3px 0 0 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.pagination li:last-child a,
|
.pagination ul > li:last-child > a,
|
||||||
.pagination li:last-child span {
|
.pagination ul > li:last-child > span {
|
||||||
-webkit-border-radius: 0 3px 3px 0;
|
-webkit-border-radius: 0 3px 3px 0;
|
||||||
-moz-border-radius: 0 3px 3px 0;
|
-moz-border-radius: 0 3px 3px 0;
|
||||||
border-radius: 0 3px 3px 0;
|
border-radius: 0 3px 3px 0;
|
||||||
|
@ -4679,7 +4826,8 @@ input[type="submit"].btn.btn-mini {
|
||||||
display: inline;
|
display: inline;
|
||||||
}
|
}
|
||||||
|
|
||||||
.pager a {
|
.pager a,
|
||||||
|
.pager span {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
padding: 5px 14px;
|
padding: 5px 14px;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
|
@ -4694,7 +4842,8 @@ input[type="submit"].btn.btn-mini {
|
||||||
background-color: #f5f5f5;
|
background-color: #f5f5f5;
|
||||||
}
|
}
|
||||||
|
|
||||||
.pager .next a {
|
.pager .next a,
|
||||||
|
.pager .next span {
|
||||||
float: right;
|
float: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4703,25 +4852,26 @@ input[type="submit"].btn.btn-mini {
|
||||||
}
|
}
|
||||||
|
|
||||||
.pager .disabled a,
|
.pager .disabled a,
|
||||||
.pager .disabled a:hover {
|
.pager .disabled a:hover,
|
||||||
|
.pager .disabled span {
|
||||||
color: #999999;
|
color: #999999;
|
||||||
cursor: default;
|
cursor: default;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.modal-open .dropdown-menu {
|
.modal-open .modal .dropdown-menu {
|
||||||
z-index: 2050;
|
z-index: 2050;
|
||||||
}
|
}
|
||||||
|
|
||||||
.modal-open .dropdown.open {
|
.modal-open .modal .dropdown.open {
|
||||||
*z-index: 2050;
|
*z-index: 2050;
|
||||||
}
|
}
|
||||||
|
|
||||||
.modal-open .popover {
|
.modal-open .modal .popover {
|
||||||
z-index: 2060;
|
z-index: 2060;
|
||||||
}
|
}
|
||||||
|
|
||||||
.modal-open .tooltip {
|
.modal-open .modal .tooltip {
|
||||||
z-index: 2080;
|
z-index: 2080;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
82
css/drf-styles.css
Normal file
82
css/drf-styles.css
Normal file
|
@ -0,0 +1,82 @@
|
||||||
|
/* Set the body padding-top when above 980px to push the content down from
|
||||||
|
below the navbar, which is fixed at >980px screen widths. */
|
||||||
|
@media (min-width: 980px) {
|
||||||
|
body {
|
||||||
|
padding-top: 71px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
padding-bottom: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* Preserve the spacing of the navbar across different screen sizes. */
|
||||||
|
.navbar-inner {
|
||||||
|
padding: 5px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 979px) {
|
||||||
|
.navbar .brand {
|
||||||
|
margin-left: 0;
|
||||||
|
padding-left: 0;
|
||||||
|
}
|
||||||
|
.navbar-inner .container-fluid {
|
||||||
|
padding-left: 15px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.nav-list li.main {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* Set the table of contents to static so it flows back into the content when
|
||||||
|
viewed on tablets and smaller. */
|
||||||
|
@media (max-width: 767px) {
|
||||||
|
#table-of-contents {
|
||||||
|
position: static;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* When the page is in two-column layout, give the main content some room
|
||||||
|
to breath on the left. */
|
||||||
|
@media (min-width: 768px) {
|
||||||
|
#main-content {
|
||||||
|
padding-left: 1em;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
blockquote {
|
||||||
|
font-family: Georgia, serif;
|
||||||
|
font-size: 18px;
|
||||||
|
font-style: italic;
|
||||||
|
margin: 0.25em 0;
|
||||||
|
padding: 0.25em 40px;
|
||||||
|
line-height: 1.45;
|
||||||
|
position: relative;
|
||||||
|
color: #383838;
|
||||||
|
border-left: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
blockquote:before {
|
||||||
|
display: block;
|
||||||
|
content: "\201C";
|
||||||
|
font-size: 80px;
|
||||||
|
position: absolute;
|
||||||
|
left: -10px;
|
||||||
|
top: -20px;
|
||||||
|
color: #7a7a7a;
|
||||||
|
}
|
||||||
|
|
||||||
|
blockquote p:last-child {
|
||||||
|
color: #999999;
|
||||||
|
font-size: 14px;
|
||||||
|
display: block;
|
||||||
|
margin-top: 5px;
|
||||||
|
}
|
||||||
|
|
BIN
img/glyphicons-halflings-white.png
Normal file
BIN
img/glyphicons-halflings-white.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 8.6 KiB |
BIN
img/glyphicons-halflings.png
Normal file
BIN
img/glyphicons-halflings.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 12 KiB |
48
index.html
48
index.html
|
@ -8,47 +8,8 @@
|
||||||
|
|
||||||
<!-- Le styles -->
|
<!-- Le styles -->
|
||||||
<link href="http://tomchristie.github.com/django-rest-framework/css/bootstrap.css" rel="stylesheet">
|
<link href="http://tomchristie.github.com/django-rest-framework/css/bootstrap.css" rel="stylesheet">
|
||||||
<style type="text/css">
|
|
||||||
body {
|
|
||||||
padding-top: 60px;
|
|
||||||
padding-bottom: 40px;
|
|
||||||
}
|
|
||||||
.sidebar-nav {
|
|
||||||
padding: 9px 0;
|
|
||||||
}
|
|
||||||
.nav-list li.main {
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
blockquote {
|
|
||||||
font-family: Georgia, serif;
|
|
||||||
font-size: 18px;
|
|
||||||
font-style: italic;
|
|
||||||
margin: 0.25em 0;
|
|
||||||
padding: 0.25em 40px;
|
|
||||||
line-height: 1.45;
|
|
||||||
position: relative;
|
|
||||||
color: #383838;
|
|
||||||
border-left: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
blockquote:before {
|
|
||||||
display: block;
|
|
||||||
content: "\201C";
|
|
||||||
font-size: 80px;
|
|
||||||
position: absolute;
|
|
||||||
left: -10px;
|
|
||||||
top: -20px;
|
|
||||||
color: #7a7a7a;
|
|
||||||
}
|
|
||||||
|
|
||||||
blockquote p:last-child {
|
|
||||||
color: #999999;
|
|
||||||
font-size: 14px;
|
|
||||||
display: block;
|
|
||||||
margin-top: 5px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<link href="http://tomchristie.github.com/django-rest-framework/css/bootstrap-responsive.css" rel="stylesheet">
|
<link href="http://tomchristie.github.com/django-rest-framework/css/bootstrap-responsive.css" rel="stylesheet">
|
||||||
|
<link href="http://tomchristie.github.com/django-rest-framework/css/drf-styles.css" rel="stylesheet">
|
||||||
|
|
||||||
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
|
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
|
||||||
<!--[if lt IE 9]>
|
<!--[if lt IE 9]>
|
||||||
|
@ -124,7 +85,7 @@ margin-top: 5px;
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="row-fluid">
|
<div class="row-fluid">
|
||||||
<div class="span3">
|
<div class="span3">
|
||||||
<div class="well affix span3">
|
<div id="table-of-contents" class="well affix span3">
|
||||||
<ul class="nav nav-list side-nav">
|
<ul class="nav nav-list side-nav">
|
||||||
<li class="main"><a href="#django-rest-framework">Django REST framework</a></li>
|
<li class="main"><a href="#django-rest-framework">Django REST framework</a></li>
|
||||||
<li><a href="#requirements">Requirements</a></li>
|
<li><a href="#requirements">Requirements</a></li>
|
||||||
|
@ -140,7 +101,7 @@ margin-top: 5px;
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="span9">
|
<div id="main-content" class="span9">
|
||||||
<h1 id="django-rest-framework">Django REST framework</h1>
|
<h1 id="django-rest-framework">Django REST framework</h1>
|
||||||
<p><strong>A toolkit for building well-connected, self-describing Web APIs.</strong></p>
|
<p><strong>A toolkit for building well-connected, self-describing Web APIs.</strong></p>
|
||||||
<p><strong>WARNING: This documentation is for the 2.0 redesign of REST framework. It is a work in progress.</strong></p>
|
<p><strong>WARNING: This documentation is for the 2.0 redesign of REST framework. It is a work in progress.</strong></p>
|
||||||
|
@ -255,9 +216,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</p>
|
||||||
<!-- Le javascript
|
<!-- Le javascript
|
||||||
================================================== -->
|
================================================== -->
|
||||||
<!-- Placed at the end of the document so the pages load faster -->
|
<!-- Placed at the end of the document so the pages load faster -->
|
||||||
<script src="http://tomchristie.github.com/django-rest-framework/js/jquery.js"></script>
|
<script src="http://tomchristie.github.com/django-rest-framework/js/jquery-1.8.1-min.js"></script>
|
||||||
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-dropdown.js"></script>
|
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-dropdown.js"></script>
|
||||||
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-scrollspy.js"></script>
|
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-scrollspy.js"></script>
|
||||||
|
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-collapse.js"></script>
|
||||||
<script>
|
<script>
|
||||||
//$('.side-nav').scrollspy()
|
//$('.side-nav').scrollspy()
|
||||||
var shiftWindow = function() { scrollBy(0, -50) };
|
var shiftWindow = function() { scrollBy(0, -50) };
|
||||||
|
|
104
js/bootstrap-affix.js
vendored
Executable file
104
js/bootstrap-affix.js
vendored
Executable file
|
@ -0,0 +1,104 @@
|
||||||
|
/* ==========================================================
|
||||||
|
* bootstrap-affix.js v2.1.1
|
||||||
|
* http://twitter.github.com/bootstrap/javascript.html#affix
|
||||||
|
* ==========================================================
|
||||||
|
* Copyright 2012 Twitter, Inc.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
* ========================================================== */
|
||||||
|
|
||||||
|
|
||||||
|
!function ($) {
|
||||||
|
|
||||||
|
"use strict"; // jshint ;_;
|
||||||
|
|
||||||
|
|
||||||
|
/* AFFIX CLASS DEFINITION
|
||||||
|
* ====================== */
|
||||||
|
|
||||||
|
var Affix = function (element, options) {
|
||||||
|
this.options = $.extend({}, $.fn.affix.defaults, options)
|
||||||
|
this.$window = $(window).on('scroll.affix.data-api', $.proxy(this.checkPosition, this))
|
||||||
|
this.$element = $(element)
|
||||||
|
this.checkPosition()
|
||||||
|
}
|
||||||
|
|
||||||
|
Affix.prototype.checkPosition = function () {
|
||||||
|
if (!this.$element.is(':visible')) return
|
||||||
|
|
||||||
|
var scrollHeight = $(document).height()
|
||||||
|
, scrollTop = this.$window.scrollTop()
|
||||||
|
, position = this.$element.offset()
|
||||||
|
, offset = this.options.offset
|
||||||
|
, offsetBottom = offset.bottom
|
||||||
|
, offsetTop = offset.top
|
||||||
|
, reset = 'affix affix-top affix-bottom'
|
||||||
|
, affix
|
||||||
|
|
||||||
|
if (typeof offset != 'object') offsetBottom = offsetTop = offset
|
||||||
|
if (typeof offsetTop == 'function') offsetTop = offset.top()
|
||||||
|
if (typeof offsetBottom == 'function') offsetBottom = offset.bottom()
|
||||||
|
|
||||||
|
affix = this.unpin != null && (scrollTop + this.unpin <= position.top) ?
|
||||||
|
false : offsetBottom != null && (position.top + this.$element.height() >= scrollHeight - offsetBottom) ?
|
||||||
|
'bottom' : offsetTop != null && scrollTop <= offsetTop ?
|
||||||
|
'top' : false
|
||||||
|
|
||||||
|
if (this.affixed === affix) return
|
||||||
|
|
||||||
|
this.affixed = affix
|
||||||
|
this.unpin = affix == 'bottom' ? position.top - scrollTop : null
|
||||||
|
|
||||||
|
this.$element.removeClass(reset).addClass('affix' + (affix ? '-' + affix : ''))
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* AFFIX PLUGIN DEFINITION
|
||||||
|
* ======================= */
|
||||||
|
|
||||||
|
$.fn.affix = function (option) {
|
||||||
|
return this.each(function () {
|
||||||
|
var $this = $(this)
|
||||||
|
, data = $this.data('affix')
|
||||||
|
, options = typeof option == 'object' && option
|
||||||
|
if (!data) $this.data('affix', (data = new Affix(this, options)))
|
||||||
|
if (typeof option == 'string') data[option]()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
$.fn.affix.Constructor = Affix
|
||||||
|
|
||||||
|
$.fn.affix.defaults = {
|
||||||
|
offset: 0
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* AFFIX DATA-API
|
||||||
|
* ============== */
|
||||||
|
|
||||||
|
$(window).on('load', function () {
|
||||||
|
$('[data-spy="affix"]').each(function () {
|
||||||
|
var $spy = $(this)
|
||||||
|
, data = $spy.data()
|
||||||
|
|
||||||
|
data.offset = data.offset || {}
|
||||||
|
|
||||||
|
data.offsetBottom && (data.offset.bottom = data.offsetBottom)
|
||||||
|
data.offsetTop && (data.offset.top = data.offsetTop)
|
||||||
|
|
||||||
|
$spy.affix(data)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
}(window.jQuery);
|
2
js/bootstrap-alert.js
vendored
Normal file → Executable file
2
js/bootstrap-alert.js
vendored
Normal file → Executable file
|
@ -1,5 +1,5 @@
|
||||||
/* ==========================================================
|
/* ==========================================================
|
||||||
* bootstrap-alert.js v2.1.0
|
* bootstrap-alert.js v2.1.1
|
||||||
* http://twitter.github.com/bootstrap/javascript.html#alerts
|
* http://twitter.github.com/bootstrap/javascript.html#alerts
|
||||||
* ==========================================================
|
* ==========================================================
|
||||||
* Copyright 2012 Twitter, Inc.
|
* Copyright 2012 Twitter, Inc.
|
||||||
|
|
4
js/bootstrap-button.js
vendored
Normal file → Executable file
4
js/bootstrap-button.js
vendored
Normal file → Executable file
|
@ -1,5 +1,5 @@
|
||||||
/* ============================================================
|
/* ============================================================
|
||||||
* bootstrap-button.js v2.1.0
|
* bootstrap-button.js v2.1.1
|
||||||
* http://twitter.github.com/bootstrap/javascript.html#buttons
|
* http://twitter.github.com/bootstrap/javascript.html#buttons
|
||||||
* ============================================================
|
* ============================================================
|
||||||
* Copyright 2012 Twitter, Inc.
|
* Copyright 2012 Twitter, Inc.
|
||||||
|
@ -51,7 +51,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
Button.prototype.toggle = function () {
|
Button.prototype.toggle = function () {
|
||||||
var $parent = this.$element.parent('[data-toggle="buttons-radio"]')
|
var $parent = this.$element.closest('[data-toggle="buttons-radio"]')
|
||||||
|
|
||||||
$parent && $parent
|
$parent && $parent
|
||||||
.find('.active')
|
.find('.active')
|
||||||
|
|
2
js/bootstrap-carousel.js
vendored
Normal file → Executable file
2
js/bootstrap-carousel.js
vendored
Normal file → Executable file
|
@ -1,5 +1,5 @@
|
||||||
/* ==========================================================
|
/* ==========================================================
|
||||||
* bootstrap-carousel.js v2.1.0
|
* bootstrap-carousel.js v2.1.1
|
||||||
* http://twitter.github.com/bootstrap/javascript.html#carousel
|
* http://twitter.github.com/bootstrap/javascript.html#carousel
|
||||||
* ==========================================================
|
* ==========================================================
|
||||||
* Copyright 2012 Twitter, Inc.
|
* Copyright 2012 Twitter, Inc.
|
||||||
|
|
2
js/bootstrap-collapse.js
vendored
Normal file → Executable file
2
js/bootstrap-collapse.js
vendored
Normal file → Executable file
|
@ -1,5 +1,5 @@
|
||||||
/* =============================================================
|
/* =============================================================
|
||||||
* bootstrap-collapse.js v2.1.0
|
* bootstrap-collapse.js v2.1.1
|
||||||
* http://twitter.github.com/bootstrap/javascript.html#collapse
|
* http://twitter.github.com/bootstrap/javascript.html#collapse
|
||||||
* =============================================================
|
* =============================================================
|
||||||
* Copyright 2012 Twitter, Inc.
|
* Copyright 2012 Twitter, Inc.
|
||||||
|
|
6
js/bootstrap-dropdown.js
vendored
Normal file → Executable file
6
js/bootstrap-dropdown.js
vendored
Normal file → Executable file
|
@ -1,5 +1,5 @@
|
||||||
/* ============================================================
|
/* ============================================================
|
||||||
* bootstrap-dropdown.js v2.1.0
|
* bootstrap-dropdown.js v2.1.1
|
||||||
* http://twitter.github.com/bootstrap/javascript.html#dropdowns
|
* http://twitter.github.com/bootstrap/javascript.html#dropdowns
|
||||||
* ============================================================
|
* ============================================================
|
||||||
* Copyright 2012 Twitter, Inc.
|
* Copyright 2012 Twitter, Inc.
|
||||||
|
@ -110,7 +110,7 @@
|
||||||
|
|
||||||
if (!selector) {
|
if (!selector) {
|
||||||
selector = $this.attr('href')
|
selector = $this.attr('href')
|
||||||
selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
|
selector = selector && /#/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
|
||||||
}
|
}
|
||||||
|
|
||||||
$parent = $(selector)
|
$parent = $(selector)
|
||||||
|
@ -142,7 +142,7 @@
|
||||||
$('html')
|
$('html')
|
||||||
.on('click.dropdown.data-api touchstart.dropdown.data-api', clearMenus)
|
.on('click.dropdown.data-api touchstart.dropdown.data-api', clearMenus)
|
||||||
$('body')
|
$('body')
|
||||||
.on('click.dropdown touchstart.dropdown.data-api', '.dropdown', function (e) { e.stopPropagation() })
|
.on('click.dropdown touchstart.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
|
||||||
.on('click.dropdown.data-api touchstart.dropdown.data-api' , toggle, Dropdown.prototype.toggle)
|
.on('click.dropdown.data-api touchstart.dropdown.data-api' , toggle, Dropdown.prototype.toggle)
|
||||||
.on('keydown.dropdown.data-api touchstart.dropdown.data-api', toggle + ', [role=menu]' , Dropdown.prototype.keydown)
|
.on('keydown.dropdown.data-api touchstart.dropdown.data-api', toggle + ', [role=menu]' , Dropdown.prototype.keydown)
|
||||||
})
|
})
|
||||||
|
|
2
js/bootstrap-modal.js
vendored
Normal file → Executable file
2
js/bootstrap-modal.js
vendored
Normal file → Executable file
|
@ -1,5 +1,5 @@
|
||||||
/* =========================================================
|
/* =========================================================
|
||||||
* bootstrap-modal.js v2.1.0
|
* bootstrap-modal.js v2.1.1
|
||||||
* http://twitter.github.com/bootstrap/javascript.html#modals
|
* http://twitter.github.com/bootstrap/javascript.html#modals
|
||||||
* =========================================================
|
* =========================================================
|
||||||
* Copyright 2012 Twitter, Inc.
|
* Copyright 2012 Twitter, Inc.
|
||||||
|
|
2
js/bootstrap-popover.js
vendored
Normal file → Executable file
2
js/bootstrap-popover.js
vendored
Normal file → Executable file
|
@ -1,5 +1,5 @@
|
||||||
/* ===========================================================
|
/* ===========================================================
|
||||||
* bootstrap-popover.js v2.1.0
|
* bootstrap-popover.js v2.1.1
|
||||||
* http://twitter.github.com/bootstrap/javascript.html#popovers
|
* http://twitter.github.com/bootstrap/javascript.html#popovers
|
||||||
* ===========================================================
|
* ===========================================================
|
||||||
* Copyright 2012 Twitter, Inc.
|
* Copyright 2012 Twitter, Inc.
|
||||||
|
|
2
js/bootstrap-scrollspy.js
vendored
Normal file → Executable file
2
js/bootstrap-scrollspy.js
vendored
Normal file → Executable file
|
@ -1,5 +1,5 @@
|
||||||
/* =============================================================
|
/* =============================================================
|
||||||
* bootstrap-scrollspy.js v2.1.0
|
* bootstrap-scrollspy.js v2.1.1
|
||||||
* http://twitter.github.com/bootstrap/javascript.html#scrollspy
|
* http://twitter.github.com/bootstrap/javascript.html#scrollspy
|
||||||
* =============================================================
|
* =============================================================
|
||||||
* Copyright 2012 Twitter, Inc.
|
* Copyright 2012 Twitter, Inc.
|
||||||
|
|
2
js/bootstrap-tab.js
vendored
Normal file → Executable file
2
js/bootstrap-tab.js
vendored
Normal file → Executable file
|
@ -1,5 +1,5 @@
|
||||||
/* ========================================================
|
/* ========================================================
|
||||||
* bootstrap-tab.js v2.1.0
|
* bootstrap-tab.js v2.1.1
|
||||||
* http://twitter.github.com/bootstrap/javascript.html#tabs
|
* http://twitter.github.com/bootstrap/javascript.html#tabs
|
||||||
* ========================================================
|
* ========================================================
|
||||||
* Copyright 2012 Twitter, Inc.
|
* Copyright 2012 Twitter, Inc.
|
||||||
|
|
2
js/bootstrap-tooltip.js
vendored
Normal file → Executable file
2
js/bootstrap-tooltip.js
vendored
Normal file → Executable file
|
@ -1,5 +1,5 @@
|
||||||
/* ===========================================================
|
/* ===========================================================
|
||||||
* bootstrap-tooltip.js v2.1.0
|
* bootstrap-tooltip.js v2.1.1
|
||||||
* http://twitter.github.com/bootstrap/javascript.html#tooltips
|
* http://twitter.github.com/bootstrap/javascript.html#tooltips
|
||||||
* Inspired by the original jQuery.tipsy by Jason Frame
|
* Inspired by the original jQuery.tipsy by Jason Frame
|
||||||
* ===========================================================
|
* ===========================================================
|
||||||
|
|
2
js/bootstrap-transition.js
vendored
Normal file → Executable file
2
js/bootstrap-transition.js
vendored
Normal file → Executable file
|
@ -1,5 +1,5 @@
|
||||||
/* ===================================================
|
/* ===================================================
|
||||||
* bootstrap-transition.js v2.1.0
|
* bootstrap-transition.js v2.1.1
|
||||||
* http://twitter.github.com/bootstrap/javascript.html#transitions
|
* http://twitter.github.com/bootstrap/javascript.html#transitions
|
||||||
* ===================================================
|
* ===================================================
|
||||||
* Copyright 2012 Twitter, Inc.
|
* Copyright 2012 Twitter, Inc.
|
||||||
|
|
4
js/bootstrap-typeahead.js
vendored
Normal file → Executable file
4
js/bootstrap-typeahead.js
vendored
Normal file → Executable file
|
@ -1,5 +1,5 @@
|
||||||
/* =============================================================
|
/* =============================================================
|
||||||
* bootstrap-typeahead.js v2.1.0
|
* bootstrap-typeahead.js v2.1.1
|
||||||
* http://twitter.github.com/bootstrap/javascript.html#typeahead
|
* http://twitter.github.com/bootstrap/javascript.html#typeahead
|
||||||
* =============================================================
|
* =============================================================
|
||||||
* Copyright 2012 Twitter, Inc.
|
* Copyright 2012 Twitter, Inc.
|
||||||
|
@ -174,7 +174,7 @@
|
||||||
.on('keypress', $.proxy(this.keypress, this))
|
.on('keypress', $.proxy(this.keypress, this))
|
||||||
.on('keyup', $.proxy(this.keyup, this))
|
.on('keyup', $.proxy(this.keyup, this))
|
||||||
|
|
||||||
if ($.browser.webkit || $.browser.msie) {
|
if ($.browser.chrome || $.browser.webkit || $.browser.msie) {
|
||||||
this.$element.on('keydown', $.proxy(this.keydown, this))
|
this.$element.on('keydown', $.proxy(this.keydown, this))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
2
js/jquery-1.8.1-min.js
vendored
Normal file
2
js/jquery-1.8.1-min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
|
@ -8,47 +8,8 @@
|
||||||
|
|
||||||
<!-- Le styles -->
|
<!-- Le styles -->
|
||||||
<link href="http://tomchristie.github.com/django-rest-framework/css/bootstrap.css" rel="stylesheet">
|
<link href="http://tomchristie.github.com/django-rest-framework/css/bootstrap.css" rel="stylesheet">
|
||||||
<style type="text/css">
|
|
||||||
body {
|
|
||||||
padding-top: 60px;
|
|
||||||
padding-bottom: 40px;
|
|
||||||
}
|
|
||||||
.sidebar-nav {
|
|
||||||
padding: 9px 0;
|
|
||||||
}
|
|
||||||
.nav-list li.main {
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
blockquote {
|
|
||||||
font-family: Georgia, serif;
|
|
||||||
font-size: 18px;
|
|
||||||
font-style: italic;
|
|
||||||
margin: 0.25em 0;
|
|
||||||
padding: 0.25em 40px;
|
|
||||||
line-height: 1.45;
|
|
||||||
position: relative;
|
|
||||||
color: #383838;
|
|
||||||
border-left: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
blockquote:before {
|
|
||||||
display: block;
|
|
||||||
content: "\201C";
|
|
||||||
font-size: 80px;
|
|
||||||
position: absolute;
|
|
||||||
left: -10px;
|
|
||||||
top: -20px;
|
|
||||||
color: #7a7a7a;
|
|
||||||
}
|
|
||||||
|
|
||||||
blockquote p:last-child {
|
|
||||||
color: #999999;
|
|
||||||
font-size: 14px;
|
|
||||||
display: block;
|
|
||||||
margin-top: 5px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<link href="http://tomchristie.github.com/django-rest-framework/css/bootstrap-responsive.css" rel="stylesheet">
|
<link href="http://tomchristie.github.com/django-rest-framework/css/bootstrap-responsive.css" rel="stylesheet">
|
||||||
|
<link href="http://tomchristie.github.com/django-rest-framework/css/drf-styles.css" rel="stylesheet">
|
||||||
|
|
||||||
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
|
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
|
||||||
<!--[if lt IE 9]>
|
<!--[if lt IE 9]>
|
||||||
|
@ -124,7 +85,7 @@ margin-top: 5px;
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="row-fluid">
|
<div class="row-fluid">
|
||||||
<div class="span3">
|
<div class="span3">
|
||||||
<div class="well affix span3">
|
<div id="table-of-contents" class="well affix span3">
|
||||||
<ul class="nav nav-list side-nav">
|
<ul class="nav nav-list side-nav">
|
||||||
<li class="main"><a href="#contributing-to-rest-framework">Contributing to REST framework</a></li>
|
<li class="main"><a href="#contributing-to-rest-framework">Contributing to REST framework</a></li>
|
||||||
<li><a href="#managing-compatibility-issues">Managing compatibility issues</a></li>
|
<li><a href="#managing-compatibility-issues">Managing compatibility issues</a></li>
|
||||||
|
@ -134,7 +95,7 @@ margin-top: 5px;
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="span9">
|
<div id="main-content" class="span9">
|
||||||
<h1 id="contributing-to-rest-framework">Contributing to REST framework</h1>
|
<h1 id="contributing-to-rest-framework">Contributing to REST framework</h1>
|
||||||
<h2 id="managing-compatibility-issues">Managing compatibility issues</h2>
|
<h2 id="managing-compatibility-issues">Managing compatibility issues</h2>
|
||||||
<p><strong>Describe compat module</strong></p>
|
<p><strong>Describe compat module</strong></p>
|
||||||
|
@ -146,9 +107,10 @@ margin-top: 5px;
|
||||||
<!-- Le javascript
|
<!-- Le javascript
|
||||||
================================================== -->
|
================================================== -->
|
||||||
<!-- Placed at the end of the document so the pages load faster -->
|
<!-- Placed at the end of the document so the pages load faster -->
|
||||||
<script src="http://tomchristie.github.com/django-rest-framework/js/jquery.js"></script>
|
<script src="http://tomchristie.github.com/django-rest-framework/js/jquery-1.8.1-min.js"></script>
|
||||||
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-dropdown.js"></script>
|
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-dropdown.js"></script>
|
||||||
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-scrollspy.js"></script>
|
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-scrollspy.js"></script>
|
||||||
|
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-collapse.js"></script>
|
||||||
<script>
|
<script>
|
||||||
//$('.side-nav').scrollspy()
|
//$('.side-nav').scrollspy()
|
||||||
var shiftWindow = function() { scrollBy(0, -50) };
|
var shiftWindow = function() { scrollBy(0, -50) };
|
||||||
|
|
|
@ -8,47 +8,8 @@
|
||||||
|
|
||||||
<!-- Le styles -->
|
<!-- Le styles -->
|
||||||
<link href="http://tomchristie.github.com/django-rest-framework/css/bootstrap.css" rel="stylesheet">
|
<link href="http://tomchristie.github.com/django-rest-framework/css/bootstrap.css" rel="stylesheet">
|
||||||
<style type="text/css">
|
|
||||||
body {
|
|
||||||
padding-top: 60px;
|
|
||||||
padding-bottom: 40px;
|
|
||||||
}
|
|
||||||
.sidebar-nav {
|
|
||||||
padding: 9px 0;
|
|
||||||
}
|
|
||||||
.nav-list li.main {
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
blockquote {
|
|
||||||
font-family: Georgia, serif;
|
|
||||||
font-size: 18px;
|
|
||||||
font-style: italic;
|
|
||||||
margin: 0.25em 0;
|
|
||||||
padding: 0.25em 40px;
|
|
||||||
line-height: 1.45;
|
|
||||||
position: relative;
|
|
||||||
color: #383838;
|
|
||||||
border-left: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
blockquote:before {
|
|
||||||
display: block;
|
|
||||||
content: "\201C";
|
|
||||||
font-size: 80px;
|
|
||||||
position: absolute;
|
|
||||||
left: -10px;
|
|
||||||
top: -20px;
|
|
||||||
color: #7a7a7a;
|
|
||||||
}
|
|
||||||
|
|
||||||
blockquote p:last-child {
|
|
||||||
color: #999999;
|
|
||||||
font-size: 14px;
|
|
||||||
display: block;
|
|
||||||
margin-top: 5px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<link href="http://tomchristie.github.com/django-rest-framework/css/bootstrap-responsive.css" rel="stylesheet">
|
<link href="http://tomchristie.github.com/django-rest-framework/css/bootstrap-responsive.css" rel="stylesheet">
|
||||||
|
<link href="http://tomchristie.github.com/django-rest-framework/css/drf-styles.css" rel="stylesheet">
|
||||||
|
|
||||||
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
|
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
|
||||||
<!--[if lt IE 9]>
|
<!--[if lt IE 9]>
|
||||||
|
@ -124,7 +85,7 @@ margin-top: 5px;
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="row-fluid">
|
<div class="row-fluid">
|
||||||
<div class="span3">
|
<div class="span3">
|
||||||
<div class="well affix span3">
|
<div id="table-of-contents" class="well affix span3">
|
||||||
<ul class="nav nav-list side-nav">
|
<ul class="nav nav-list side-nav">
|
||||||
<li class="main"><a href="#credits">Credits</a></li>
|
<li class="main"><a href="#credits">Credits</a></li>
|
||||||
<li><a href="#additional-thanks">Additional thanks</a></li>
|
<li><a href="#additional-thanks">Additional thanks</a></li>
|
||||||
|
@ -134,7 +95,7 @@ margin-top: 5px;
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="span9">
|
<div id="main-content" class="span9">
|
||||||
<h1 id="credits">Credits</h1>
|
<h1 id="credits">Credits</h1>
|
||||||
<p>The following people have helped make REST framework great.</p>
|
<p>The following people have helped make REST framework great.</p>
|
||||||
<ul>
|
<ul>
|
||||||
|
@ -194,9 +155,10 @@ margin-top: 5px;
|
||||||
<!-- Le javascript
|
<!-- Le javascript
|
||||||
================================================== -->
|
================================================== -->
|
||||||
<!-- Placed at the end of the document so the pages load faster -->
|
<!-- Placed at the end of the document so the pages load faster -->
|
||||||
<script src="http://tomchristie.github.com/django-rest-framework/js/jquery.js"></script>
|
<script src="http://tomchristie.github.com/django-rest-framework/js/jquery-1.8.1-min.js"></script>
|
||||||
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-dropdown.js"></script>
|
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-dropdown.js"></script>
|
||||||
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-scrollspy.js"></script>
|
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-scrollspy.js"></script>
|
||||||
|
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-collapse.js"></script>
|
||||||
<script>
|
<script>
|
||||||
//$('.side-nav').scrollspy()
|
//$('.side-nav').scrollspy()
|
||||||
var shiftWindow = function() { scrollBy(0, -50) };
|
var shiftWindow = function() { scrollBy(0, -50) };
|
||||||
|
|
|
@ -8,47 +8,8 @@
|
||||||
|
|
||||||
<!-- Le styles -->
|
<!-- Le styles -->
|
||||||
<link href="http://tomchristie.github.com/django-rest-framework/css/bootstrap.css" rel="stylesheet">
|
<link href="http://tomchristie.github.com/django-rest-framework/css/bootstrap.css" rel="stylesheet">
|
||||||
<style type="text/css">
|
|
||||||
body {
|
|
||||||
padding-top: 60px;
|
|
||||||
padding-bottom: 40px;
|
|
||||||
}
|
|
||||||
.sidebar-nav {
|
|
||||||
padding: 9px 0;
|
|
||||||
}
|
|
||||||
.nav-list li.main {
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
blockquote {
|
|
||||||
font-family: Georgia, serif;
|
|
||||||
font-size: 18px;
|
|
||||||
font-style: italic;
|
|
||||||
margin: 0.25em 0;
|
|
||||||
padding: 0.25em 40px;
|
|
||||||
line-height: 1.45;
|
|
||||||
position: relative;
|
|
||||||
color: #383838;
|
|
||||||
border-left: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
blockquote:before {
|
|
||||||
display: block;
|
|
||||||
content: "\201C";
|
|
||||||
font-size: 80px;
|
|
||||||
position: absolute;
|
|
||||||
left: -10px;
|
|
||||||
top: -20px;
|
|
||||||
color: #7a7a7a;
|
|
||||||
}
|
|
||||||
|
|
||||||
blockquote p:last-child {
|
|
||||||
color: #999999;
|
|
||||||
font-size: 14px;
|
|
||||||
display: block;
|
|
||||||
margin-top: 5px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<link href="http://tomchristie.github.com/django-rest-framework/css/bootstrap-responsive.css" rel="stylesheet">
|
<link href="http://tomchristie.github.com/django-rest-framework/css/bootstrap-responsive.css" rel="stylesheet">
|
||||||
|
<link href="http://tomchristie.github.com/django-rest-framework/css/drf-styles.css" rel="stylesheet">
|
||||||
|
|
||||||
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
|
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
|
||||||
<!--[if lt IE 9]>
|
<!--[if lt IE 9]>
|
||||||
|
@ -124,7 +85,7 @@ margin-top: 5px;
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="row-fluid">
|
<div class="row-fluid">
|
||||||
<div class="span3">
|
<div class="span3">
|
||||||
<div class="well affix span3">
|
<div id="table-of-contents" class="well affix span3">
|
||||||
<ul class="nav nav-list side-nav">
|
<ul class="nav nav-list side-nav">
|
||||||
<li class="main"><a href="#working-with-ajax-and-csrf">Working with AJAX and CSRF</a></li>
|
<li class="main"><a href="#working-with-ajax-and-csrf">Working with AJAX and CSRF</a></li>
|
||||||
|
|
||||||
|
@ -132,7 +93,7 @@ margin-top: 5px;
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="span9">
|
<div id="main-content" class="span9">
|
||||||
<h1 id="working-with-ajax-and-csrf">Working with AJAX and CSRF</h1>
|
<h1 id="working-with-ajax-and-csrf">Working with AJAX and CSRF</h1>
|
||||||
<blockquote>
|
<blockquote>
|
||||||
<p>"Take a close look at possible CSRF / XSRF vulnerabilities on your own websites. They're the worst kind of vulnerability -- very easy to exploit by attackers, yet not so intuitively easy to understand for software developers, at least until you've been bitten by one."</p>
|
<p>"Take a close look at possible CSRF / XSRF vulnerabilities on your own websites. They're the worst kind of vulnerability -- very easy to exploit by attackers, yet not so intuitively easy to understand for software developers, at least until you've been bitten by one."</p>
|
||||||
|
@ -150,9 +111,10 @@ margin-top: 5px;
|
||||||
<!-- Le javascript
|
<!-- Le javascript
|
||||||
================================================== -->
|
================================================== -->
|
||||||
<!-- Placed at the end of the document so the pages load faster -->
|
<!-- Placed at the end of the document so the pages load faster -->
|
||||||
<script src="http://tomchristie.github.com/django-rest-framework/js/jquery.js"></script>
|
<script src="http://tomchristie.github.com/django-rest-framework/js/jquery-1.8.1-min.js"></script>
|
||||||
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-dropdown.js"></script>
|
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-dropdown.js"></script>
|
||||||
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-scrollspy.js"></script>
|
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-scrollspy.js"></script>
|
||||||
|
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-collapse.js"></script>
|
||||||
<script>
|
<script>
|
||||||
//$('.side-nav').scrollspy()
|
//$('.side-nav').scrollspy()
|
||||||
var shiftWindow = function() { scrollBy(0, -50) };
|
var shiftWindow = function() { scrollBy(0, -50) };
|
||||||
|
|
|
@ -8,47 +8,8 @@
|
||||||
|
|
||||||
<!-- Le styles -->
|
<!-- Le styles -->
|
||||||
<link href="http://tomchristie.github.com/django-rest-framework/css/bootstrap.css" rel="stylesheet">
|
<link href="http://tomchristie.github.com/django-rest-framework/css/bootstrap.css" rel="stylesheet">
|
||||||
<style type="text/css">
|
|
||||||
body {
|
|
||||||
padding-top: 60px;
|
|
||||||
padding-bottom: 40px;
|
|
||||||
}
|
|
||||||
.sidebar-nav {
|
|
||||||
padding: 9px 0;
|
|
||||||
}
|
|
||||||
.nav-list li.main {
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
blockquote {
|
|
||||||
font-family: Georgia, serif;
|
|
||||||
font-size: 18px;
|
|
||||||
font-style: italic;
|
|
||||||
margin: 0.25em 0;
|
|
||||||
padding: 0.25em 40px;
|
|
||||||
line-height: 1.45;
|
|
||||||
position: relative;
|
|
||||||
color: #383838;
|
|
||||||
border-left: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
blockquote:before {
|
|
||||||
display: block;
|
|
||||||
content: "\201C";
|
|
||||||
font-size: 80px;
|
|
||||||
position: absolute;
|
|
||||||
left: -10px;
|
|
||||||
top: -20px;
|
|
||||||
color: #7a7a7a;
|
|
||||||
}
|
|
||||||
|
|
||||||
blockquote p:last-child {
|
|
||||||
color: #999999;
|
|
||||||
font-size: 14px;
|
|
||||||
display: block;
|
|
||||||
margin-top: 5px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<link href="http://tomchristie.github.com/django-rest-framework/css/bootstrap-responsive.css" rel="stylesheet">
|
<link href="http://tomchristie.github.com/django-rest-framework/css/bootstrap-responsive.css" rel="stylesheet">
|
||||||
|
<link href="http://tomchristie.github.com/django-rest-framework/css/drf-styles.css" rel="stylesheet">
|
||||||
|
|
||||||
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
|
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
|
||||||
<!--[if lt IE 9]>
|
<!--[if lt IE 9]>
|
||||||
|
@ -124,7 +85,7 @@ margin-top: 5px;
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="row-fluid">
|
<div class="row-fluid">
|
||||||
<div class="span3">
|
<div class="span3">
|
||||||
<div class="well affix span3">
|
<div id="table-of-contents" class="well affix span3">
|
||||||
<ul class="nav nav-list side-nav">
|
<ul class="nav nav-list side-nav">
|
||||||
<li class="main"><a href="#browser-based-put-&-delete">Browser based PUT & DELETE</a></li>
|
<li class="main"><a href="#browser-based-put-&-delete">Browser based PUT & DELETE</a></li>
|
||||||
<li><a href="#overloading-the-http-method">Overloading the HTTP method</a></li>
|
<li><a href="#overloading-the-http-method">Overloading the HTTP method</a></li>
|
||||||
|
@ -135,7 +96,7 @@ margin-top: 5px;
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="span9">
|
<div id="main-content" class="span9">
|
||||||
<h1 id="browser-based-put-delete">Browser based PUT & DELETE</h1>
|
<h1 id="browser-based-put-delete">Browser based PUT & DELETE</h1>
|
||||||
<blockquote>
|
<blockquote>
|
||||||
<p>"There are two noncontroversial uses for overloaded POST. The first is to <em>simulate</em> HTTP's uniform interface for clients like web browsers that don't support PUT or DELETE"</p>
|
<p>"There are two noncontroversial uses for overloaded POST. The first is to <em>simulate</em> HTTP's uniform interface for clients like web browsers that don't support PUT or DELETE"</p>
|
||||||
|
@ -169,9 +130,10 @@ margin-top: 5px;
|
||||||
<!-- Le javascript
|
<!-- Le javascript
|
||||||
================================================== -->
|
================================================== -->
|
||||||
<!-- Placed at the end of the document so the pages load faster -->
|
<!-- Placed at the end of the document so the pages load faster -->
|
||||||
<script src="http://tomchristie.github.com/django-rest-framework/js/jquery.js"></script>
|
<script src="http://tomchristie.github.com/django-rest-framework/js/jquery-1.8.1-min.js"></script>
|
||||||
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-dropdown.js"></script>
|
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-dropdown.js"></script>
|
||||||
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-scrollspy.js"></script>
|
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-scrollspy.js"></script>
|
||||||
|
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-collapse.js"></script>
|
||||||
<script>
|
<script>
|
||||||
//$('.side-nav').scrollspy()
|
//$('.side-nav').scrollspy()
|
||||||
var shiftWindow = function() { scrollBy(0, -50) };
|
var shiftWindow = function() { scrollBy(0, -50) };
|
||||||
|
|
|
@ -8,47 +8,8 @@
|
||||||
|
|
||||||
<!-- Le styles -->
|
<!-- Le styles -->
|
||||||
<link href="http://tomchristie.github.com/django-rest-framework/css/bootstrap.css" rel="stylesheet">
|
<link href="http://tomchristie.github.com/django-rest-framework/css/bootstrap.css" rel="stylesheet">
|
||||||
<style type="text/css">
|
|
||||||
body {
|
|
||||||
padding-top: 60px;
|
|
||||||
padding-bottom: 40px;
|
|
||||||
}
|
|
||||||
.sidebar-nav {
|
|
||||||
padding: 9px 0;
|
|
||||||
}
|
|
||||||
.nav-list li.main {
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
blockquote {
|
|
||||||
font-family: Georgia, serif;
|
|
||||||
font-size: 18px;
|
|
||||||
font-style: italic;
|
|
||||||
margin: 0.25em 0;
|
|
||||||
padding: 0.25em 40px;
|
|
||||||
line-height: 1.45;
|
|
||||||
position: relative;
|
|
||||||
color: #383838;
|
|
||||||
border-left: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
blockquote:before {
|
|
||||||
display: block;
|
|
||||||
content: "\201C";
|
|
||||||
font-size: 80px;
|
|
||||||
position: absolute;
|
|
||||||
left: -10px;
|
|
||||||
top: -20px;
|
|
||||||
color: #7a7a7a;
|
|
||||||
}
|
|
||||||
|
|
||||||
blockquote p:last-child {
|
|
||||||
color: #999999;
|
|
||||||
font-size: 14px;
|
|
||||||
display: block;
|
|
||||||
margin-top: 5px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<link href="http://tomchristie.github.com/django-rest-framework/css/bootstrap-responsive.css" rel="stylesheet">
|
<link href="http://tomchristie.github.com/django-rest-framework/css/bootstrap-responsive.css" rel="stylesheet">
|
||||||
|
<link href="http://tomchristie.github.com/django-rest-framework/css/drf-styles.css" rel="stylesheet">
|
||||||
|
|
||||||
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
|
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
|
||||||
<!--[if lt IE 9]>
|
<!--[if lt IE 9]>
|
||||||
|
@ -124,7 +85,7 @@ margin-top: 5px;
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="row-fluid">
|
<div class="row-fluid">
|
||||||
<div class="span3">
|
<div class="span3">
|
||||||
<div class="well affix span3">
|
<div id="table-of-contents" class="well affix span3">
|
||||||
<ul class="nav nav-list side-nav">
|
<ul class="nav nav-list side-nav">
|
||||||
<li class="main"><a href="#tutorial-1-serialization">Tutorial 1: Serialization</a></li>
|
<li class="main"><a href="#tutorial-1-serialization">Tutorial 1: Serialization</a></li>
|
||||||
<li><a href="#introduction">Introduction</a></li>
|
<li><a href="#introduction">Introduction</a></li>
|
||||||
|
@ -141,7 +102,7 @@ margin-top: 5px;
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="span9">
|
<div id="main-content" class="span9">
|
||||||
<h1 id="tutorial-1-serialization">Tutorial 1: Serialization</h1>
|
<h1 id="tutorial-1-serialization">Tutorial 1: Serialization</h1>
|
||||||
<h2 id="introduction">Introduction</h2>
|
<h2 id="introduction">Introduction</h2>
|
||||||
<p>This tutorial will walk you through the building blocks that make up REST framework. It'll take a little while to get through, but it'll give you a comprehensive understanding of how everything fits together.</p>
|
<p>This tutorial will walk you through the building blocks that make up REST framework. It'll take a little while to get through, but it'll give you a comprehensive understanding of how everything fits together.</p>
|
||||||
|
@ -355,9 +316,10 @@ urlpatterns = patterns('blog.views',
|
||||||
<!-- Le javascript
|
<!-- Le javascript
|
||||||
================================================== -->
|
================================================== -->
|
||||||
<!-- Placed at the end of the document so the pages load faster -->
|
<!-- Placed at the end of the document so the pages load faster -->
|
||||||
<script src="http://tomchristie.github.com/django-rest-framework/js/jquery.js"></script>
|
<script src="http://tomchristie.github.com/django-rest-framework/js/jquery-1.8.1-min.js"></script>
|
||||||
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-dropdown.js"></script>
|
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-dropdown.js"></script>
|
||||||
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-scrollspy.js"></script>
|
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-scrollspy.js"></script>
|
||||||
|
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-collapse.js"></script>
|
||||||
<script>
|
<script>
|
||||||
//$('.side-nav').scrollspy()
|
//$('.side-nav').scrollspy()
|
||||||
var shiftWindow = function() { scrollBy(0, -50) };
|
var shiftWindow = function() { scrollBy(0, -50) };
|
||||||
|
|
|
@ -8,47 +8,8 @@
|
||||||
|
|
||||||
<!-- Le styles -->
|
<!-- Le styles -->
|
||||||
<link href="http://tomchristie.github.com/django-rest-framework/css/bootstrap.css" rel="stylesheet">
|
<link href="http://tomchristie.github.com/django-rest-framework/css/bootstrap.css" rel="stylesheet">
|
||||||
<style type="text/css">
|
|
||||||
body {
|
|
||||||
padding-top: 60px;
|
|
||||||
padding-bottom: 40px;
|
|
||||||
}
|
|
||||||
.sidebar-nav {
|
|
||||||
padding: 9px 0;
|
|
||||||
}
|
|
||||||
.nav-list li.main {
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
blockquote {
|
|
||||||
font-family: Georgia, serif;
|
|
||||||
font-size: 18px;
|
|
||||||
font-style: italic;
|
|
||||||
margin: 0.25em 0;
|
|
||||||
padding: 0.25em 40px;
|
|
||||||
line-height: 1.45;
|
|
||||||
position: relative;
|
|
||||||
color: #383838;
|
|
||||||
border-left: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
blockquote:before {
|
|
||||||
display: block;
|
|
||||||
content: "\201C";
|
|
||||||
font-size: 80px;
|
|
||||||
position: absolute;
|
|
||||||
left: -10px;
|
|
||||||
top: -20px;
|
|
||||||
color: #7a7a7a;
|
|
||||||
}
|
|
||||||
|
|
||||||
blockquote p:last-child {
|
|
||||||
color: #999999;
|
|
||||||
font-size: 14px;
|
|
||||||
display: block;
|
|
||||||
margin-top: 5px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<link href="http://tomchristie.github.com/django-rest-framework/css/bootstrap-responsive.css" rel="stylesheet">
|
<link href="http://tomchristie.github.com/django-rest-framework/css/bootstrap-responsive.css" rel="stylesheet">
|
||||||
|
<link href="http://tomchristie.github.com/django-rest-framework/css/drf-styles.css" rel="stylesheet">
|
||||||
|
|
||||||
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
|
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
|
||||||
<!--[if lt IE 9]>
|
<!--[if lt IE 9]>
|
||||||
|
@ -124,7 +85,7 @@ margin-top: 5px;
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="row-fluid">
|
<div class="row-fluid">
|
||||||
<div class="span3">
|
<div class="span3">
|
||||||
<div class="well affix span3">
|
<div id="table-of-contents" class="well affix span3">
|
||||||
<ul class="nav nav-list side-nav">
|
<ul class="nav nav-list side-nav">
|
||||||
<li class="main"><a href="#tutorial-2-requests-and-responses">Tutorial 2: Requests and Responses</a></li>
|
<li class="main"><a href="#tutorial-2-requests-and-responses">Tutorial 2: Requests and Responses</a></li>
|
||||||
<li><a href="#request-objects">Request objects</a></li>
|
<li><a href="#request-objects">Request objects</a></li>
|
||||||
|
@ -140,7 +101,7 @@ margin-top: 5px;
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="span9">
|
<div id="main-content" class="span9">
|
||||||
<h1 id="tutorial-2-requests-and-responses">Tutorial 2: Requests and Responses</h1>
|
<h1 id="tutorial-2-requests-and-responses">Tutorial 2: Requests and Responses</h1>
|
||||||
<p>From this point we're going to really start covering the core of REST framework.
|
<p>From this point we're going to really start covering the core of REST framework.
|
||||||
Let's introduce a couple of essential building blocks.</p>
|
Let's introduce a couple of essential building blocks.</p>
|
||||||
|
@ -256,9 +217,10 @@ urlpatterns = format_suffix_patterns(urlpatterns)
|
||||||
<!-- Le javascript
|
<!-- Le javascript
|
||||||
================================================== -->
|
================================================== -->
|
||||||
<!-- Placed at the end of the document so the pages load faster -->
|
<!-- Placed at the end of the document so the pages load faster -->
|
||||||
<script src="http://tomchristie.github.com/django-rest-framework/js/jquery.js"></script>
|
<script src="http://tomchristie.github.com/django-rest-framework/js/jquery-1.8.1-min.js"></script>
|
||||||
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-dropdown.js"></script>
|
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-dropdown.js"></script>
|
||||||
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-scrollspy.js"></script>
|
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-scrollspy.js"></script>
|
||||||
|
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-collapse.js"></script>
|
||||||
<script>
|
<script>
|
||||||
//$('.side-nav').scrollspy()
|
//$('.side-nav').scrollspy()
|
||||||
var shiftWindow = function() { scrollBy(0, -50) };
|
var shiftWindow = function() { scrollBy(0, -50) };
|
||||||
|
|
|
@ -8,47 +8,8 @@
|
||||||
|
|
||||||
<!-- Le styles -->
|
<!-- Le styles -->
|
||||||
<link href="http://tomchristie.github.com/django-rest-framework/css/bootstrap.css" rel="stylesheet">
|
<link href="http://tomchristie.github.com/django-rest-framework/css/bootstrap.css" rel="stylesheet">
|
||||||
<style type="text/css">
|
|
||||||
body {
|
|
||||||
padding-top: 60px;
|
|
||||||
padding-bottom: 40px;
|
|
||||||
}
|
|
||||||
.sidebar-nav {
|
|
||||||
padding: 9px 0;
|
|
||||||
}
|
|
||||||
.nav-list li.main {
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
blockquote {
|
|
||||||
font-family: Georgia, serif;
|
|
||||||
font-size: 18px;
|
|
||||||
font-style: italic;
|
|
||||||
margin: 0.25em 0;
|
|
||||||
padding: 0.25em 40px;
|
|
||||||
line-height: 1.45;
|
|
||||||
position: relative;
|
|
||||||
color: #383838;
|
|
||||||
border-left: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
blockquote:before {
|
|
||||||
display: block;
|
|
||||||
content: "\201C";
|
|
||||||
font-size: 80px;
|
|
||||||
position: absolute;
|
|
||||||
left: -10px;
|
|
||||||
top: -20px;
|
|
||||||
color: #7a7a7a;
|
|
||||||
}
|
|
||||||
|
|
||||||
blockquote p:last-child {
|
|
||||||
color: #999999;
|
|
||||||
font-size: 14px;
|
|
||||||
display: block;
|
|
||||||
margin-top: 5px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<link href="http://tomchristie.github.com/django-rest-framework/css/bootstrap-responsive.css" rel="stylesheet">
|
<link href="http://tomchristie.github.com/django-rest-framework/css/bootstrap-responsive.css" rel="stylesheet">
|
||||||
|
<link href="http://tomchristie.github.com/django-rest-framework/css/drf-styles.css" rel="stylesheet">
|
||||||
|
|
||||||
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
|
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
|
||||||
<!--[if lt IE 9]>
|
<!--[if lt IE 9]>
|
||||||
|
@ -124,7 +85,7 @@ margin-top: 5px;
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="row-fluid">
|
<div class="row-fluid">
|
||||||
<div class="span3">
|
<div class="span3">
|
||||||
<div class="well affix span3">
|
<div id="table-of-contents" class="well affix span3">
|
||||||
<ul class="nav nav-list side-nav">
|
<ul class="nav nav-list side-nav">
|
||||||
<li class="main"><a href="#tutorial-3-class-based-views">Tutorial 3: Class Based Views</a></li>
|
<li class="main"><a href="#tutorial-3-class-based-views">Tutorial 3: Class Based Views</a></li>
|
||||||
<li><a href="#rewriting-our-api-using-class-based-views">Rewriting our API using class based views</a></li>
|
<li><a href="#rewriting-our-api-using-class-based-views">Rewriting our API using class based views</a></li>
|
||||||
|
@ -135,17 +96,17 @@ margin-top: 5px;
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="span9">
|
<div id="main-content" class="span9">
|
||||||
<h1 id="tutorial-3-class-based-views">Tutorial 3: Class Based Views</h1>
|
<h1 id="tutorial-3-class-based-views">Tutorial 3: Class Based Views</h1>
|
||||||
<p>We can also write our API views using class based views, rather than function based views. As we'll see this is a powerful pattern that allows us to reuse common functionality, and helps us keep our code <a href="http://en.wikipedia.org/wiki/Don't_repeat_yourself">DRY</a>.</p>
|
<p>We can also write our API views using class based views, rather than function based views. As we'll see this is a powerful pattern that allows us to reuse common functionality, and helps us keep our code <a href="http://en.wikipedia.org/wiki/Don't_repeat_yourself">DRY</a>.</p>
|
||||||
<h2 id="rewriting-our-api-using-class-based-views">Rewriting our API using class based views</h2>
|
<h2 id="rewriting-our-api-using-class-based-views">Rewriting our API using class based views</h2>
|
||||||
<p>We'll start by rewriting the root view as a class based view. All this involves is a little bit of refactoring.</p>
|
<p>We'll start by rewriting the root view as a class based view. All this involves is a little bit of refactoring.</p>
|
||||||
<pre><code>from blog.models import Comment
|
<pre><code>from blog.models import Comment
|
||||||
from blog.serializers import ComentSerializer
|
from blog.serializers import CommentSerializer
|
||||||
from django.http import Http404
|
from django.http import Http404
|
||||||
from djangorestframework.views import APIView
|
from djangorestframework.views import APIView
|
||||||
from djangorestframework.response import Response
|
from djangorestframework.response import Response
|
||||||
from djangorestframework.status import status
|
from djangorestframework import status
|
||||||
|
|
||||||
class CommentRoot(APIView):
|
class CommentRoot(APIView):
|
||||||
"""
|
"""
|
||||||
|
@ -153,16 +114,16 @@ class CommentRoot(APIView):
|
||||||
"""
|
"""
|
||||||
def get(self, request, format=None):
|
def get(self, request, format=None):
|
||||||
comments = Comment.objects.all()
|
comments = Comment.objects.all()
|
||||||
serializer = ComentSerializer(instance=comments)
|
serializer = CommentSerializer(instance=comments)
|
||||||
return Response(serializer.data)
|
return Response(serializer.data)
|
||||||
|
|
||||||
def post(self, request, format=None)
|
def post(self, request, format=None):
|
||||||
serializer = ComentSerializer(request.DATA)
|
serializer = CommentSerializer(request.DATA)
|
||||||
if serializer.is_valid():
|
if serializer.is_valid():
|
||||||
comment = serializer.object
|
comment = serializer.object
|
||||||
comment.save()
|
comment.save()
|
||||||
return Response(serializer.serialized, status=HTTP_201_CREATED)
|
return Response(serializer.serialized, status=status.HTTP_201_CREATED)
|
||||||
return Response(serializer.serialized_errors, status=HTTP_400_BAD_REQUEST)
|
return Response(serializer.serialized_errors, status=status.HTTP_400_BAD_REQUEST)
|
||||||
|
|
||||||
comment_root = CommentRoot.as_view()
|
comment_root = CommentRoot.as_view()
|
||||||
</code></pre>
|
</code></pre>
|
||||||
|
@ -272,9 +233,10 @@ comment_instance = CommentInstance.as_view()
|
||||||
<!-- Le javascript
|
<!-- Le javascript
|
||||||
================================================== -->
|
================================================== -->
|
||||||
<!-- Placed at the end of the document so the pages load faster -->
|
<!-- Placed at the end of the document so the pages load faster -->
|
||||||
<script src="http://tomchristie.github.com/django-rest-framework/js/jquery.js"></script>
|
<script src="http://tomchristie.github.com/django-rest-framework/js/jquery-1.8.1-min.js"></script>
|
||||||
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-dropdown.js"></script>
|
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-dropdown.js"></script>
|
||||||
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-scrollspy.js"></script>
|
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-scrollspy.js"></script>
|
||||||
|
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-collapse.js"></script>
|
||||||
<script>
|
<script>
|
||||||
//$('.side-nav').scrollspy()
|
//$('.side-nav').scrollspy()
|
||||||
var shiftWindow = function() { scrollBy(0, -50) };
|
var shiftWindow = function() { scrollBy(0, -50) };
|
||||||
|
|
|
@ -8,47 +8,8 @@
|
||||||
|
|
||||||
<!-- Le styles -->
|
<!-- Le styles -->
|
||||||
<link href="http://tomchristie.github.com/django-rest-framework/css/bootstrap.css" rel="stylesheet">
|
<link href="http://tomchristie.github.com/django-rest-framework/css/bootstrap.css" rel="stylesheet">
|
||||||
<style type="text/css">
|
|
||||||
body {
|
|
||||||
padding-top: 60px;
|
|
||||||
padding-bottom: 40px;
|
|
||||||
}
|
|
||||||
.sidebar-nav {
|
|
||||||
padding: 9px 0;
|
|
||||||
}
|
|
||||||
.nav-list li.main {
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
blockquote {
|
|
||||||
font-family: Georgia, serif;
|
|
||||||
font-size: 18px;
|
|
||||||
font-style: italic;
|
|
||||||
margin: 0.25em 0;
|
|
||||||
padding: 0.25em 40px;
|
|
||||||
line-height: 1.45;
|
|
||||||
position: relative;
|
|
||||||
color: #383838;
|
|
||||||
border-left: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
blockquote:before {
|
|
||||||
display: block;
|
|
||||||
content: "\201C";
|
|
||||||
font-size: 80px;
|
|
||||||
position: absolute;
|
|
||||||
left: -10px;
|
|
||||||
top: -20px;
|
|
||||||
color: #7a7a7a;
|
|
||||||
}
|
|
||||||
|
|
||||||
blockquote p:last-child {
|
|
||||||
color: #999999;
|
|
||||||
font-size: 14px;
|
|
||||||
display: block;
|
|
||||||
margin-top: 5px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<link href="http://tomchristie.github.com/django-rest-framework/css/bootstrap-responsive.css" rel="stylesheet">
|
<link href="http://tomchristie.github.com/django-rest-framework/css/bootstrap-responsive.css" rel="stylesheet">
|
||||||
|
<link href="http://tomchristie.github.com/django-rest-framework/css/drf-styles.css" rel="stylesheet">
|
||||||
|
|
||||||
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
|
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
|
||||||
<!--[if lt IE 9]>
|
<!--[if lt IE 9]>
|
||||||
|
@ -124,14 +85,14 @@ margin-top: 5px;
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="row-fluid">
|
<div class="row-fluid">
|
||||||
<div class="span3">
|
<div class="span3">
|
||||||
<div class="well affix span3">
|
<div id="table-of-contents" class="well affix span3">
|
||||||
<ul class="nav nav-list side-nav">
|
<ul class="nav nav-list side-nav">
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="span9">
|
<div id="main-content" class="span9">
|
||||||
<p><a href="5-relationships-and-hyperlinked-apis">part 5</a></p>
|
<p><a href="5-relationships-and-hyperlinked-apis">part 5</a></p>
|
||||||
</div><!--/span-->
|
</div><!--/span-->
|
||||||
</div><!--/row-->
|
</div><!--/row-->
|
||||||
|
@ -140,9 +101,10 @@ margin-top: 5px;
|
||||||
<!-- Le javascript
|
<!-- Le javascript
|
||||||
================================================== -->
|
================================================== -->
|
||||||
<!-- Placed at the end of the document so the pages load faster -->
|
<!-- Placed at the end of the document so the pages load faster -->
|
||||||
<script src="http://tomchristie.github.com/django-rest-framework/js/jquery.js"></script>
|
<script src="http://tomchristie.github.com/django-rest-framework/js/jquery-1.8.1-min.js"></script>
|
||||||
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-dropdown.js"></script>
|
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-dropdown.js"></script>
|
||||||
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-scrollspy.js"></script>
|
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-scrollspy.js"></script>
|
||||||
|
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-collapse.js"></script>
|
||||||
<script>
|
<script>
|
||||||
//$('.side-nav').scrollspy()
|
//$('.side-nav').scrollspy()
|
||||||
var shiftWindow = function() { scrollBy(0, -50) };
|
var shiftWindow = function() { scrollBy(0, -50) };
|
||||||
|
|
|
@ -8,47 +8,8 @@
|
||||||
|
|
||||||
<!-- Le styles -->
|
<!-- Le styles -->
|
||||||
<link href="http://tomchristie.github.com/django-rest-framework/css/bootstrap.css" rel="stylesheet">
|
<link href="http://tomchristie.github.com/django-rest-framework/css/bootstrap.css" rel="stylesheet">
|
||||||
<style type="text/css">
|
|
||||||
body {
|
|
||||||
padding-top: 60px;
|
|
||||||
padding-bottom: 40px;
|
|
||||||
}
|
|
||||||
.sidebar-nav {
|
|
||||||
padding: 9px 0;
|
|
||||||
}
|
|
||||||
.nav-list li.main {
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
blockquote {
|
|
||||||
font-family: Georgia, serif;
|
|
||||||
font-size: 18px;
|
|
||||||
font-style: italic;
|
|
||||||
margin: 0.25em 0;
|
|
||||||
padding: 0.25em 40px;
|
|
||||||
line-height: 1.45;
|
|
||||||
position: relative;
|
|
||||||
color: #383838;
|
|
||||||
border-left: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
blockquote:before {
|
|
||||||
display: block;
|
|
||||||
content: "\201C";
|
|
||||||
font-size: 80px;
|
|
||||||
position: absolute;
|
|
||||||
left: -10px;
|
|
||||||
top: -20px;
|
|
||||||
color: #7a7a7a;
|
|
||||||
}
|
|
||||||
|
|
||||||
blockquote p:last-child {
|
|
||||||
color: #999999;
|
|
||||||
font-size: 14px;
|
|
||||||
display: block;
|
|
||||||
margin-top: 5px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<link href="http://tomchristie.github.com/django-rest-framework/css/bootstrap-responsive.css" rel="stylesheet">
|
<link href="http://tomchristie.github.com/django-rest-framework/css/bootstrap-responsive.css" rel="stylesheet">
|
||||||
|
<link href="http://tomchristie.github.com/django-rest-framework/css/drf-styles.css" rel="stylesheet">
|
||||||
|
|
||||||
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
|
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
|
||||||
<!--[if lt IE 9]>
|
<!--[if lt IE 9]>
|
||||||
|
@ -124,14 +85,14 @@ margin-top: 5px;
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="row-fluid">
|
<div class="row-fluid">
|
||||||
<div class="span3">
|
<div class="span3">
|
||||||
<div class="well affix span3">
|
<div id="table-of-contents" class="well affix span3">
|
||||||
<ul class="nav nav-list side-nav">
|
<ul class="nav nav-list side-nav">
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="span9">
|
<div id="main-content" class="span9">
|
||||||
<p><strong>TODO</strong></p>
|
<p><strong>TODO</strong></p>
|
||||||
<ul>
|
<ul>
|
||||||
<li>Create BlogPost model</li>
|
<li>Create BlogPost model</li>
|
||||||
|
@ -146,9 +107,10 @@ margin-top: 5px;
|
||||||
<!-- Le javascript
|
<!-- Le javascript
|
||||||
================================================== -->
|
================================================== -->
|
||||||
<!-- Placed at the end of the document so the pages load faster -->
|
<!-- Placed at the end of the document so the pages load faster -->
|
||||||
<script src="http://tomchristie.github.com/django-rest-framework/js/jquery.js"></script>
|
<script src="http://tomchristie.github.com/django-rest-framework/js/jquery-1.8.1-min.js"></script>
|
||||||
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-dropdown.js"></script>
|
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-dropdown.js"></script>
|
||||||
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-scrollspy.js"></script>
|
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-scrollspy.js"></script>
|
||||||
|
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-collapse.js"></script>
|
||||||
<script>
|
<script>
|
||||||
//$('.side-nav').scrollspy()
|
//$('.side-nav').scrollspy()
|
||||||
var shiftWindow = function() { scrollBy(0, -50) };
|
var shiftWindow = function() { scrollBy(0, -50) };
|
||||||
|
|
|
@ -8,47 +8,8 @@
|
||||||
|
|
||||||
<!-- Le styles -->
|
<!-- Le styles -->
|
||||||
<link href="http://tomchristie.github.com/django-rest-framework/css/bootstrap.css" rel="stylesheet">
|
<link href="http://tomchristie.github.com/django-rest-framework/css/bootstrap.css" rel="stylesheet">
|
||||||
<style type="text/css">
|
|
||||||
body {
|
|
||||||
padding-top: 60px;
|
|
||||||
padding-bottom: 40px;
|
|
||||||
}
|
|
||||||
.sidebar-nav {
|
|
||||||
padding: 9px 0;
|
|
||||||
}
|
|
||||||
.nav-list li.main {
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
blockquote {
|
|
||||||
font-family: Georgia, serif;
|
|
||||||
font-size: 18px;
|
|
||||||
font-style: italic;
|
|
||||||
margin: 0.25em 0;
|
|
||||||
padding: 0.25em 40px;
|
|
||||||
line-height: 1.45;
|
|
||||||
position: relative;
|
|
||||||
color: #383838;
|
|
||||||
border-left: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
blockquote:before {
|
|
||||||
display: block;
|
|
||||||
content: "\201C";
|
|
||||||
font-size: 80px;
|
|
||||||
position: absolute;
|
|
||||||
left: -10px;
|
|
||||||
top: -20px;
|
|
||||||
color: #7a7a7a;
|
|
||||||
}
|
|
||||||
|
|
||||||
blockquote p:last-child {
|
|
||||||
color: #999999;
|
|
||||||
font-size: 14px;
|
|
||||||
display: block;
|
|
||||||
margin-top: 5px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<link href="http://tomchristie.github.com/django-rest-framework/css/bootstrap-responsive.css" rel="stylesheet">
|
<link href="http://tomchristie.github.com/django-rest-framework/css/bootstrap-responsive.css" rel="stylesheet">
|
||||||
|
<link href="http://tomchristie.github.com/django-rest-framework/css/drf-styles.css" rel="stylesheet">
|
||||||
|
|
||||||
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
|
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
|
||||||
<!--[if lt IE 9]>
|
<!--[if lt IE 9]>
|
||||||
|
@ -124,7 +85,7 @@ margin-top: 5px;
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="row-fluid">
|
<div class="row-fluid">
|
||||||
<div class="span3">
|
<div class="span3">
|
||||||
<div class="well affix span3">
|
<div id="table-of-contents" class="well affix span3">
|
||||||
<ul class="nav nav-list side-nav">
|
<ul class="nav nav-list side-nav">
|
||||||
<li><a href="#trade-offs-between-views-vs-resources">Trade-offs between views vs resources.</a></li>
|
<li><a href="#trade-offs-between-views-vs-resources">Trade-offs between views vs resources.</a></li>
|
||||||
<li><a href="#onwards-and-upwards">Onwards and upwards.</a></li>
|
<li><a href="#onwards-and-upwards">Onwards and upwards.</a></li>
|
||||||
|
@ -133,7 +94,7 @@ margin-top: 5px;
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="span9">
|
<div id="main-content" class="span9">
|
||||||
<p>serializers.py</p>
|
<p>serializers.py</p>
|
||||||
<pre><code>class BlogPostSerializer(URLModelSerializer):
|
<pre><code>class BlogPostSerializer(URLModelSerializer):
|
||||||
class Meta:
|
class Meta:
|
||||||
|
@ -173,7 +134,7 @@ urlpatterns = router.urlpatterns
|
||||||
<ul>
|
<ul>
|
||||||
<li>Contribute on GitHub by reviewing issues, and submitting issues or pull requests.</li>
|
<li>Contribute on GitHub by reviewing issues, and submitting issues or pull requests.</li>
|
||||||
<li>Join the REST framework group, and help build the community.</li>
|
<li>Join the REST framework group, and help build the community.</li>
|
||||||
<li>Follow me on Twitter and say hi.</li>
|
<li>Follow me <a href="https://twitter.com/_tomchristie">on Twitter</a> and say hi.</li>
|
||||||
</ul>
|
</ul>
|
||||||
<p>Now go build something great.</p>
|
<p>Now go build something great.</p>
|
||||||
</div><!--/span-->
|
</div><!--/span-->
|
||||||
|
@ -183,9 +144,10 @@ urlpatterns = router.urlpatterns
|
||||||
<!-- Le javascript
|
<!-- Le javascript
|
||||||
================================================== -->
|
================================================== -->
|
||||||
<!-- Placed at the end of the document so the pages load faster -->
|
<!-- Placed at the end of the document so the pages load faster -->
|
||||||
<script src="http://tomchristie.github.com/django-rest-framework/js/jquery.js"></script>
|
<script src="http://tomchristie.github.com/django-rest-framework/js/jquery-1.8.1-min.js"></script>
|
||||||
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-dropdown.js"></script>
|
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-dropdown.js"></script>
|
||||||
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-scrollspy.js"></script>
|
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-scrollspy.js"></script>
|
||||||
|
<script src="http://tomchristie.github.com/django-rest-framework/js/bootstrap-collapse.js"></script>
|
||||||
<script>
|
<script>
|
||||||
//$('.side-nav').scrollspy()
|
//$('.side-nav').scrollspy()
|
||||||
var shiftWindow = function() { scrollBy(0, -50) };
|
var shiftWindow = function() { scrollBy(0, -50) };
|
||||||
|
|
Loading…
Reference in New Issue
Block a user