Skip to content
Myr

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

6 files+35 added−35 removed

modified:docs/_themes/kr/theme.conf+1 added-1 removed
2 unmodified lines
3stylesheet = flasky.css4pygments_style = flask_theme_support.FlaskyStyle56[options]7touch_icon = 7touch_icon =
modified:docs/_themes/kr_small/static/flasky.css_t+22 added-22 removed
6 unmodified lines
7 * :copyright: Copyright 2007-2010 by the Sphinx team, see AUTHORS.8 * :license: BSD, see LICENSE for details.9 *10 */11 1112@import url("basic.css");13 1314/* -- page layout ----------------------------------------------------------- */15 1516body {17 font-family: 'Georgia', serif;18 font-size: 17px;19 color: #000;
14 unmodified lines
3435hr {36 border: 1px solid #B1B4B6;37}38 3839div.body {40 background-color: #ffffff;41 color: #3E4349;42 padding: 0 30px 30px 30px;
2 unmodified lines
45img.floatingflask {46 padding: 0 0 10px 10px;47 float: right;48}49 4950div.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 5859div.footer a {60 color: #888;61 text-decoration: underline;62}63 6364div.related {65 line-height: 32px;66 color: #888;67}6869div.related ul {70 padding: 0 0 0 10px;71}72 7273div.related a {74 color: #444;75}76 7677/* -- body styles ----------------------------------------------------------- */78 7879a {80 color: #004B6B;81 text-decoration: underline;82}83 8384a:hover {85 color: #6D4100;86 text-decoration: underline;87}8889div.body {90 padding-bottom: 40px; /* saved for footer */91}92 9293div.body h1,94div.body h2,95div.body h3,96div.body h4,
11 unmodified lines
108 background: url({{ theme_index_logo }}) no-repeat center center;109 height: {{ theme_index_logo_height }};110}111{% endif %}112 112113div.body h2 { font-size: 180%; }114div.body h3 { font-size: 150%; }115div.body h4 { font-size: 130%; }116div.body h5 { font-size: 100%; }117div.body h6 { font-size: 100%; }118 118119a.headerlink {120 color: white;121 padding: 0 4px;122 text-decoration: none;123}124 124125a.headerlink:hover {126 color: #444;127 background: #eaeaea;128}129 129130div.body p, div.body dd, div.body li {131 line-height: 1.4em;132}133
29 unmodified lines
163div.note {164 background-color: #eee;165 border: 1px solid #ccc;166}167 167168div.seealso {169 background-color: #ffc;170 border: 1px solid #ff6;171}172 172173div.topic {174 background-color: #eee;175}176 176177div.warning {178 background-color: #ffe4e4;179 border: 1px solid #f66;180}181 181182p.admonition-title {183 display: inline;184}185 185186p.admonition-title:after {187 content: ":";188}189
63 unmodified lines
253254dl dd {255 margin-left: 30px;256}257 257258pre {259 padding: 0;260 margin: 15px -30px;261 padding: 8px;
26 unmodified lines
modified:docs/_themes/LICENSE+2 added-2 removed
1Modifications: 1Modifications:23Copyright (c) 2011 Kenneth Reitz.456Original Project: 6Original Project:78Copyright (c) 2010 by Armin Ronacher.910
35 unmodified lines
modified:docs/_themes/README.rst+1 added-1 removed
1krTheme Sphinx Style2====================34This repository contains sphinx styles Kenneth Reitz uses in most of 4This repository contains sphinx styles Kenneth Reitz uses in most of5his projects. It is a derivative of Mitsuhiko's themes for Flask and Flask related6projects. To use this style in your Sphinx documentation, follow7this guide:8
17 unmodified lines
modified:docs/user/quickstart.rst+8 added-8 removed
22 unmodified lines
2324Making a request with Requests is very simple.2526Begin by importing the Requests module::27 2728 >>> import requests2930Now, let's try to get a webpage. For this example, let's get GitHub's public31timeline ::
4 unmodified lines
36information we need from this object.3738Requests' simple API means that all forms of HTTP request are as obvious. For39example, this is how you make an HTTP POST request::40 4041 >>> r = requests.post("http://httpbin.org/post")4243Nice, right? What about the other HTTP request types: PUT, DELETE, HEAD and44OPTIONS? These are all just as simple::45 4546 >>> 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 lines
69You can see that the URL has been correctly encoded by printing the URL::7071 >>> print r.url72 u'http://httpbin.org/get?key2=value2&key1=value1'73 737475Response Content76----------------7778We can read the content of the server's response. Consider the GitHub timeline
149 unmodified lines
228229If you want, you can send strings to be received as files::230231 >>> 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')}233234 >>> r = requests.post(url, files=files)235 >>> r.text236 {
22 unmodified lines
259260If we made a bad request (non-200 response), we can raise it with261:class:`Response.raise_for_status()`::262263 >>> _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 404266267 >>> _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 Error
191 unmodified lines
modified:docs/MANIFEST.in+1 added-1 removed
1include HISTORY.rst README.rst LICENSE 1include HISTORY.rst README.rst LICENSE