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,6 +102,7 @@
</div>
<div id="main-content" class="span9">
<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>

View File

@ -95,6 +95,7 @@
</div>
<div id="main-content" class="span9">
<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-->

View File

@ -96,6 +96,7 @@
</div>
<div id="main-content" class="span9">
<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-->

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,6 +96,7 @@
</div>
<div id="main-content" class="span9">
<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-->

View File

@ -104,6 +104,7 @@
</div>
<div id="main-content" class="span9">
<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>

View File

@ -99,6 +99,7 @@
</div>
<div id="main-content" class="span9">
<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>

View File

@ -97,6 +97,7 @@
</div>
<div id="main-content" class="span9">
<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>

View File

@ -107,6 +107,7 @@
</div>
<div id="main-content" class="span9">
<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

View File

@ -110,6 +110,7 @@
</div>
<div id="main-content" class="span9">
<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>

View File

@ -100,6 +100,7 @@
</div>
<div id="main-content" class="span9">
<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>

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,6 +105,7 @@
</div>
<div id="main-content" class="span9">
<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>

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 {