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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,4 +1,4 @@
<a class="github" href="throttling.py"></a>
source: throttling.py
# 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

View File

@ -1,4 +1,4 @@
<a class="github" href="viewsets.py"></a>
source: viewsets.py
# 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 id="main-content" class="span9">
{{ content }}
{% include "content.html" %}
</div><!--/span-->
</div><!--/row-->
</div><!--/.fluid-container-->