From 247696e820dfe4535b3141d744129d654f9b6aea Mon Sep 17 00:00:00 2001 From: Tom Christie Date: Sat, 8 Sep 2012 22:06:13 +0100 Subject: [PATCH] Links to source files in docs --- docs/api-guide/authentication.md | 2 ++ docs/api-guide/exceptions.md | 2 ++ docs/api-guide/parsers.md | 2 ++ docs/api-guide/permissions.md | 2 ++ docs/api-guide/renderers.md | 2 ++ docs/api-guide/requests.md | 2 ++ docs/api-guide/responses.md | 2 ++ docs/api-guide/reverse.md | 2 ++ docs/api-guide/serializers.md | 2 ++ docs/api-guide/settings.md | 2 ++ docs/api-guide/status-codes.md | 2 ++ docs/api-guide/throttling.md | 2 ++ docs/api-guide/views.md | 2 ++ docs/static/css/drf-styles.css | 12 ++++++++++-- mkdocs.py | 2 ++ 15 files changed, 38 insertions(+), 2 deletions(-) diff --git a/docs/api-guide/authentication.md b/docs/api-guide/authentication.md index 45da2c552..ca29bc4da 100644 --- a/docs/api-guide/authentication.md +++ b/docs/api-guide/authentication.md @@ -1,3 +1,5 @@ + + # Authentication 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 [permission] and [throttling] policies can then use those credentials to determine if the request should be permitted. diff --git a/docs/api-guide/exceptions.md b/docs/api-guide/exceptions.md index d41327c6c..bb3ed56ea 100644 --- a/docs/api-guide/exceptions.md +++ b/docs/api-guide/exceptions.md @@ -1,3 +1,5 @@ + + # Exceptions diff --git a/docs/api-guide/parsers.md b/docs/api-guide/parsers.md index 2edc11de7..5e2344a30 100644 --- a/docs/api-guide/parsers.md +++ b/docs/api-guide/parsers.md @@ -1,3 +1,5 @@ + + # Parsers ## .parse(request) diff --git a/docs/api-guide/permissions.md b/docs/api-guide/permissions.md index 8b1378917..2e15107cb 100644 --- a/docs/api-guide/permissions.md +++ b/docs/api-guide/permissions.md @@ -1 +1,3 @@ + +# Permissions \ No newline at end of file diff --git a/docs/api-guide/renderers.md b/docs/api-guide/renderers.md index 5a66da699..1cd6d1a09 100644 --- a/docs/api-guide/renderers.md +++ b/docs/api-guide/renderers.md @@ -1,3 +1,5 @@ + + # Renderers ## .render(response) diff --git a/docs/api-guide/requests.md b/docs/api-guide/requests.md index 67ddfdac7..6746bb20d 100644 --- a/docs/api-guide/requests.md +++ b/docs/api-guide/requests.md @@ -1,3 +1,5 @@ + + # Requests > If you're doing REST-based web service stuff ... you should ignore request.POST. diff --git a/docs/api-guide/responses.md b/docs/api-guide/responses.md index 38f6e8cbd..6c279f171 100644 --- a/docs/api-guide/responses.md +++ b/docs/api-guide/responses.md @@ -1,3 +1,5 @@ + + # Responses > 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. diff --git a/docs/api-guide/reverse.md b/docs/api-guide/reverse.md index 5a1d6e261..6e42b68e1 100644 --- a/docs/api-guide/reverse.md +++ b/docs/api-guide/reverse.md @@ -1,3 +1,5 @@ + + # Returning URIs from your Web APIs > The central feature that distinguishes the REST architectural style from other network-based styles is its emphasis on a uniform interface between components. diff --git a/docs/api-guide/serializers.md b/docs/api-guide/serializers.md index 377b0c101..38a1e560e 100644 --- a/docs/api-guide/serializers.md +++ b/docs/api-guide/serializers.md @@ -1,3 +1,5 @@ + + # Serializers > Expanding the usefulness of the serializers is something that we would diff --git a/docs/api-guide/settings.md b/docs/api-guide/settings.md index 1411b9ec8..ae8dce768 100644 --- a/docs/api-guide/settings.md +++ b/docs/api-guide/settings.md @@ -1,3 +1,5 @@ + + # Settings Configuration for REST framework is all namespaced inside the `API_SETTINGS` setting. diff --git a/docs/api-guide/status-codes.md b/docs/api-guide/status-codes.md index c1d45905d..6693c79f5 100644 --- a/docs/api-guide/status-codes.md +++ b/docs/api-guide/status-codes.md @@ -1,3 +1,5 @@ + + # Status Codes > 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. diff --git a/docs/api-guide/throttling.md b/docs/api-guide/throttling.md index 8b1378917..e3a66c832 100644 --- a/docs/api-guide/throttling.md +++ b/docs/api-guide/throttling.md @@ -1 +1,3 @@ + +# Throttling diff --git a/docs/api-guide/views.md b/docs/api-guide/views.md index dd1dbebe2..43924544c 100644 --- a/docs/api-guide/views.md +++ b/docs/api-guide/views.md @@ -1,3 +1,5 @@ + + > Django's class based views are a welcome departure from the old-style views. > > — [Reinout van Rees][cite] diff --git a/docs/static/css/drf-styles.css b/docs/static/css/drf-styles.css index ecbd415c1..a0566790e 100644 --- a/docs/static/css/drf-styles.css +++ b/docs/static/css/drf-styles.css @@ -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; diff --git a/mkdocs.py b/mkdocs.py index 0acb14d12..7fb0bc174 100755 --- a/mkdocs.py +++ b/mkdocs.py @@ -24,6 +24,7 @@ else: main_header = '
  • {{ title }}
  • ' sub_header = '
  • {{ title }}
  • ' +code_label = r'\1' page = open(os.path.join(docs_dir, 'template.html'), 'r').read() @@ -68,4 +69,5 @@ for (dirpath, dirnames, filenames) in os.walk(docs_dir): output = re.sub(r'a href="([^"]*)\.md"', r'a href="\1%s"' % suffix, output) output = re.sub(r'
    :::bash', r'
    ', output)
             output = re.sub(r'
    ', r'
    ', output)
    +        output = re.sub(r'', code_label, output)
             open(build_file, 'w').write(output.encode('utf-8'))