Add links to source files in docs

This commit is contained in:
Tom Christie 2012-09-08 22:06:49 +01:00
parent 1fab487030
commit 44eea9497d
14 changed files with 40 additions and 17 deletions

View File

@ -102,7 +102,8 @@
</div>
<div id="main-content" class="span9">
<h1 id="authentication">Authentication</h1>
<p><a class="github" href="https://github.com/tomchristie/django-rest-framework/blob/restframework2/djangorestframework/authentication.py"><span class="label label-info">authentication.py</span></a></p>
<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>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>

View File

@ -95,7 +95,8 @@
</div>
<div id="main-content" class="span9">
<h1 id="exceptions">Exceptions</h1>
<p><a class="github" href="https://github.com/tomchristie/django-rest-framework/blob/restframework2/djangorestframework/exceptions.py"><span class="label label-info">exceptions.py</span></a></p>
<h1 id="exceptions">Exceptions</h1>
</div><!--/span-->
</div><!--/row-->
</div><!--/.fluid-container-->

View File

@ -96,7 +96,8 @@
</div>
<div id="main-content" class="span9">
<h1 id="parsers">Parsers</h1>
<p><a class="github" href="https://github.com/tomchristie/django-rest-framework/blob/restframework2/djangorestframework/parsers.py"><span class="label label-info">parsers.py</span></a></p>
<h1 id="parsers">Parsers</h1>
<h2 id="parserequest">.parse(request)</h2>
</div><!--/span-->
</div><!--/row-->

View File

@ -88,13 +88,15 @@
<div class="span3">
<div id="table-of-contents" class="well affix span3">
<ul class="nav nav-list side-nav">
<li class="main"><a href="#permissions">Permissions</a></li>
</ul>
</div>
</div>
<div id="main-content" class="span9">
<p><a class="github" href="https://github.com/tomchristie/django-rest-framework/blob/restframework2/djangorestframework/permissions.py"><span class="label label-info">permissions.py</span></a></p>
<h1 id="permissions">Permissions</h1>
</div><!--/span-->
</div><!--/row-->
</div><!--/.fluid-container-->

View File

@ -96,7 +96,8 @@
</div>
<div id="main-content" class="span9">
<h1 id="renderers">Renderers</h1>
<p><a class="github" href="https://github.com/tomchristie/django-rest-framework/blob/restframework2/djangorestframework/renderers.py"><span class="label label-info">renderers.py</span></a></p>
<h1 id="renderers">Renderers</h1>
<h2 id="renderresponse">.render(response)</h2>
</div><!--/span-->
</div><!--/row-->

View File

@ -104,7 +104,8 @@
</div>
<div id="main-content" class="span9">
<h1 id="requests">Requests</h1>
<p><a class="github" href="https://github.com/tomchristie/django-rest-framework/blob/restframework2/djangorestframework/request.py"><span class="label label-info">request.py</span></a></p>
<h1 id="requests">Requests</h1>
<blockquote>
<p>If you're doing REST-based web service stuff ... you should ignore request.POST.</p>
<p>— Malcom Tredinnick, <a href="https://groups.google.com/d/topic/django-developers/dxI4qVzrBY4/discussion">Django developers group</a></p>

View File

@ -99,7 +99,8 @@
</div>
<div id="main-content" class="span9">
<h1 id="responses">Responses</h1>
<p><a class="github" href="https://github.com/tomchristie/django-rest-framework/blob/restframework2/djangorestframework/response.py"><span class="label label-info">response.py</span></a></p>
<h1 id="responses">Responses</h1>
<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>&mdash; <a href="https://docs.djangoproject.com/en/dev/ref/template-response/">Django documentation</a></p>

View File

@ -97,7 +97,8 @@
</div>
<div id="main-content" class="span9">
<h1 id="returning-uris-from-your-web-apis">Returning URIs from your Web APIs</h1>
<p><a class="github" href="https://github.com/tomchristie/django-rest-framework/blob/restframework2/djangorestframework/reverse.py"><span class="label label-info">reverse.py</span></a></p>
<h1 id="returning-uris-from-your-web-apis">Returning URIs from your Web APIs</h1>
<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>&mdash; Roy Fielding, <a href="http://www.ics.uci.edu/~fielding/pubs/dissertation/rest_arch_style.htm#sec_5_1_5">Architectural Styles and the Design of Network-based Software Architectures</a></p>

View File

@ -107,7 +107,8 @@
</div>
<div id="main-content" class="span9">
<h1 id="serializers">Serializers</h1>
<p><a class="github" href="https://github.com/tomchristie/django-rest-framework/blob/restframework2/djangorestframework/serializers.py"><span class="label label-info">serializers.py</span></a></p>
<h1 id="serializers">Serializers</h1>
<blockquote>
<p>Expanding the usefulness of the serializers is something that we would
like to address. However, it's not a trivial problem, and it

View File

@ -110,7 +110,8 @@
</div>
<div id="main-content" class="span9">
<h1 id="settings">Settings</h1>
<p><a class="github" href="https://github.com/tomchristie/django-rest-framework/blob/restframework2/djangorestframework/settings.py"><span class="label label-info">settings.py</span></a></p>
<h1 id="settings">Settings</h1>
<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>
<pre class="prettyprint lang-py"><code>API_SETTINGS = {

View File

@ -100,7 +100,8 @@
</div>
<div id="main-content" class="span9">
<h1 id="status-codes">Status Codes</h1>
<p><a class="github" href="https://github.com/tomchristie/django-rest-framework/blob/restframework2/djangorestframework/status.py"><span class="label label-info">status.py</span></a></p>
<h1 id="status-codes">Status Codes</h1>
<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>&mdash; <a href="http://www.ietf.org/rfc/rfc2324.txt">RFC 2324</a>, Hyper Text Coffee Pot Control Protocol</p>

View File

@ -88,13 +88,15 @@
<div class="span3">
<div id="table-of-contents" class="well affix span3">
<ul class="nav nav-list side-nav">
<li class="main"><a href="#throttling">Throttling</a></li>
</ul>
</div>
</div>
<div id="main-content" class="span9">
<p><a class="github" href="https://github.com/tomchristie/django-rest-framework/blob/restframework2/djangorestframework/throttling.py"><span class="label label-info">throttling.py</span></a></p>
<h1 id="throttling">Throttling</h1>
</div><!--/span-->
</div><!--/row-->
</div><!--/.fluid-container-->

View File

@ -105,7 +105,8 @@
</div>
<div id="main-content" class="span9">
<blockquote>
<p><a class="github" href="https://github.com/tomchristie/django-rest-framework/blob/restframework2/djangorestframework/views.py"><span class="label label-info">views.py</span></a></p>
<blockquote>
<p>Django's class based views are a welcome departure from the old-style views.</p>
<p>&mdash; <a href="http://reinout.vanrees.org/weblog/2011/08/24/class-based-views-usage.html">Reinout van Rees</a></p>
</blockquote>

View File

@ -14,6 +14,14 @@ pre {
font-size: 12px;
}
a.github {
float: right;
margin-top: -12px;
}
a.github:hover {
text-decoration: none;
}
/* Preserve the spacing of the navbar across different screen sizes. */
.navbar-inner {
@ -66,7 +74,7 @@ blockquote {
border-left: none;
}
blockquote:before {
blockquote:before {
display: block;
content: "\201C";
font-size: 80px;
@ -76,7 +84,7 @@ blockquote {
color: #7a7a7a;
}
blockquote p:last-child {
blockquote p:last-child {
color: #999999;
font-size: 14px;
display: block;