Use MkDocs meta.source to render source code links

This commit is contained in:
José Padilla 2014-10-31 09:04:39 -04:00 committed by Dougal Matthews
parent cbb6799d2d
commit 16d442dda3
25 changed files with 122 additions and 110 deletions

View File

@ -1,4 +1,4 @@
<a class="github" href="authentication.py"></a> source: authentication.py
# Authentication # Authentication

View File

@ -1,4 +1,4 @@
<a class="github" href="negotiation.py"></a> source: negotiation.py
# Content negotiation # Content negotiation

View File

@ -1,4 +1,4 @@
<a class="github" href="exceptions.py"></a> source: exceptions.py
# Exceptions # Exceptions

View File

@ -1,4 +1,4 @@
<a class="github" href="fields.py"></a> source: fields.py
# Serializer fields # Serializer fields

View File

@ -1,4 +1,4 @@
<a class="github" href="filters.py"></a> source: filters.py
# Filtering # Filtering

View File

@ -1,4 +1,4 @@
<a class="github" href="urlpatterns.py"></a> source: urlpatterns.py
# Format suffixes # Format suffixes

View File

@ -1,5 +1,5 @@
<a class="github" href="mixins.py"></a> source: mixins.py
<a class="github" href="generics.py"></a> generics.py
# Generic views # Generic views

View File

@ -1,4 +1,4 @@
<a class="github" href="pagination.py"></a> source: pagination.py
# Pagination # Pagination

View File

@ -1,4 +1,4 @@
<a class="github" href="parsers.py"></a> source: parsers.py
# Parsers # Parsers

View File

@ -1,4 +1,4 @@
<a class="github" href="permissions.py"></a> source: permissions.py
# Permissions # Permissions

View File

@ -1,4 +1,4 @@
<a class="github" href="relations.py"></a> source: relations.py
# Serializer relations # Serializer relations

View File

@ -1,4 +1,4 @@
<a class="github" href="renderers.py"></a> source: renderers.py
# Renderers # Renderers

View File

@ -1,4 +1,4 @@
<a class="github" href="request.py"></a> source: request.py
# Requests # Requests

View File

@ -1,4 +1,4 @@
<a class="github" href="response.py"></a> source: response.py
# Responses # Responses

View File

@ -1,4 +1,4 @@
<a class="github" href="reverse.py"></a> source: reverse.py
# Returning URLs # Returning URLs

View File

@ -1,4 +1,4 @@
<a class="github" href="routers.py"></a> source: routers.py
# Routers # Routers

View File

@ -1,4 +1,4 @@
<a class="github" href="serializers.py"></a> source: serializers.py
# Serializers # Serializers

View File

@ -1,4 +1,4 @@
<a class="github" href="settings.py"></a> source: settings.py
# Settings # Settings

View File

@ -1,4 +1,4 @@
<a class="github" href="status.py"></a> source: status.py
# Status Codes # Status Codes

View File

@ -1,4 +1,4 @@
<a class="github" href="test.py"></a> source: test.py
# Testing # Testing

View File

@ -1,4 +1,4 @@
<a class="github" href="throttling.py"></a> source: throttling.py
# Throttling # Throttling

View File

@ -1,4 +1,5 @@
<a class="github" href="decorators.py"></a> <a class="github" href="views.py"></a> source: decorators.py
views.py
# Class Based Views # Class Based Views

View File

@ -1,4 +1,4 @@
<a class="github" href="viewsets.py"></a> source: viewsets.py
# ViewSets # ViewSets

11
docs/theme/content.html vendored Normal file
View File

@ -0,0 +1,11 @@
{% if meta.source %}
{% for filename in meta.source %}
<a class="github" href="https://github.com/tomchristie/django-rest-framework/tree/master/rest_framework/{{ filename }}">
<span class="label label-info">{{ filename }}</span>
</a>
{% endfor %}
{% endif %}
{{ content }}

View File

@ -118,7 +118,7 @@ a.fusion-poweredby {
</div> </div>
<div id="main-content" class="span9"> <div id="main-content" class="span9">
{{ content }} {% include "content.html" %}
</div><!--/span--> </div><!--/span-->
</div><!--/row--> </div><!--/row-->
</div><!--/.fluid-container--> </div><!--/.fluid-container-->