Merge pull request #784 from Locker537/docs_fix
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Change variable '_r' to 'r' for consistency.
authored by Kenneth Reitz · committed by Kenneth Reitz · parents 27f34a5, b31a439 · Browse files · 6 files·+35 added−35 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
6 files+35 added−35 removed
- other:+35 added−35 removed
Provenance
- Commit
cb0fdd8- Tree
b20e614- Author
Kenneth Reitz <me@kennethreitz.com>- Committer
Kenneth Reitz <me@kennethreitz.com>- Parent 1
27f34a5- Parent 2
b31a439
6 files changed+35 added−35 removed
modified:docs/_themes/kr/theme.conf+1 added-1 removed
2 unmodified lines3 stylesheet = flasky.css4 pygments_style = flask_theme_support.FlaskyStyle5 6 [options]7-touch_icon = 7+touch_icon =modified:docs/_themes/kr_small/static/flasky.css_t+22 added-22 removed
6 unmodified lines7 * :copyright: Copyright 2007-2010 by the Sphinx team, see AUTHORS.8 * :license: BSD, see LICENSE for details.9 *10 */11- 11+12 @import url("basic.css");13- 13+14 /* -- page layout ----------------------------------------------------------- */15- 15+16 body {17 font-family: 'Georgia', serif;18 font-size: 17px;19 color: #000;14 unmodified lines34 35 hr {36 border: 1px solid #B1B4B6;37 }38- 38+39 div.body {40 background-color: #ffffff;41 color: #3E4349;42 padding: 0 30px 30px 30px;2 unmodified lines45 img.floatingflask {46 padding: 0 0 10px 10px;47 float: right;48 }49- 49+50 div.footer {51 text-align: right;52 color: #888;53 padding: 10px;54 font-size: 14px;55 width: 650px;56 margin: 0 auto 40px auto;57 }58- 58+59 div.footer a {60 color: #888;61 text-decoration: underline;62 }63- 63+64 div.related {65 line-height: 32px;66 color: #888;67 }68 69 div.related ul {70 padding: 0 0 0 10px;71 }72- 72+73 div.related a {74 color: #444;75 }76- 76+77 /* -- body styles ----------------------------------------------------------- */78- 78+79 a {80 color: #004B6B;81 text-decoration: underline;82 }83- 83+84 a:hover {85 color: #6D4100;86 text-decoration: underline;87 }88 89 div.body {90 padding-bottom: 40px; /* saved for footer */91 }92- 92+93 div.body h1,94 div.body h2,95 div.body h3,96 div.body h4,11 unmodified lines108 background: url({{ theme_index_logo }}) no-repeat center center;109 height: {{ theme_index_logo_height }};110 }111 {% endif %}112- 112+113 div.body h2 { font-size: 180%; }114 div.body h3 { font-size: 150%; }115 div.body h4 { font-size: 130%; }116 div.body h5 { font-size: 100%; }117 div.body h6 { font-size: 100%; }118- 118+119 a.headerlink {120 color: white;121 padding: 0 4px;122 text-decoration: none;123 }124- 124+125 a.headerlink:hover {126 color: #444;127 background: #eaeaea;128 }129- 129+130 div.body p, div.body dd, div.body li {131 line-height: 1.4em;132 }133 29 unmodified lines163 div.note {164 background-color: #eee;165 border: 1px solid #ccc;166 }167- 167+168 div.seealso {169 background-color: #ffc;170 border: 1px solid #ff6;171 }172- 172+173 div.topic {174 background-color: #eee;175 }176- 176+177 div.warning {178 background-color: #ffe4e4;179 border: 1px solid #f66;180 }181- 181+182 p.admonition-title {183 display: inline;184 }185- 185+186 p.admonition-title:after {187 content: ":";188 }189 63 unmodified lines253 254 dl dd {255 margin-left: 30px;256 }257- 257+258 pre {259 padding: 0;260 margin: 15px -30px;261 padding: 8px;26 unmodified linesmodified:docs/_themes/LICENSE+2 added-2 removed
1-Modifications: 1+Modifications:2 3 Copyright (c) 2011 Kenneth Reitz.4 5 6-Original Project: 6+Original Project:7 8 Copyright (c) 2010 by Armin Ronacher.9 10 35 unmodified linesmodified:docs/_themes/README.rst+1 added-1 removed
1 krTheme Sphinx Style2 ====================3 4-This repository contains sphinx styles Kenneth Reitz uses in most of 4+This repository contains sphinx styles Kenneth Reitz uses in most of5 his projects. It is a derivative of Mitsuhiko's themes for Flask and Flask related6 projects. To use this style in your Sphinx documentation, follow7 this guide:8 17 unmodified linesmodified:docs/user/quickstart.rst+8 added-8 removed
22 unmodified lines23 24 Making a request with Requests is very simple.25 26 Begin by importing the Requests module::27- 27+28 >>> import requests29 30 Now, let's try to get a webpage. For this example, let's get GitHub's public31 timeline ::4 unmodified lines36 information we need from this object.37 38 Requests' simple API means that all forms of HTTP request are as obvious. For39 example, this is how you make an HTTP POST request::40- 40+41 >>> r = requests.post("http://httpbin.org/post")42 43 Nice, right? What about the other HTTP request types: PUT, DELETE, HEAD and44 OPTIONS? These are all just as simple::45- 45+46 >>> r = requests.put("http://httpbin.org/put")47 >>> r = requests.delete("http://httpbin.org/delete")48 >>> r = requests.head("http://httpbin.org/get")49 >>> r = requests.options("http://httpbin.org/get")19 unmodified lines69 You can see that the URL has been correctly encoded by printing the URL::70 71 >>> print r.url72 u'http://httpbin.org/get?key2=value2&key1=value1'73- 73 74+75 Response Content76 ----------------77 78 We can read the content of the server's response. Consider the GitHub timeline149 unmodified lines228 229 If you want, you can send strings to be received as files::230 231 >>> url = 'http://httpbin.org/post'232- >>> files = {'file': ('report.csv', 'some,data,to,send\nanother,row,to,send\n')} 232+ >>> files = {'file': ('report.csv', 'some,data,to,send\nanother,row,to,send\n')}233 234 >>> r = requests.post(url, files=files)235 >>> r.text236 {22 unmodified lines259 260 If we made a bad request (non-200 response), we can raise it with261 :class:`Response.raise_for_status()`::262 263- >>> _r = requests.get('http://httpbin.org/status/404')264- >>> _r.status_code263+ >>> bad_r = requests.get('http://httpbin.org/status/404')264+ >>> bad_r.status_code265 404266 267- >>> _r.raise_for_status()267+ >>> bad_r.raise_for_status()268 Traceback (most recent call last):269 File "requests/models.py", line 832, in raise_for_status270 raise http_error271 requests.exceptions.HTTPError: 404 Client Error191 unmodified linesmodified:docs/MANIFEST.in+1 added-1 removed
1-include HISTORY.rst README.rst LICENSE 1+include HISTORY.rst README.rst LICENSE