Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit eda3868

Browse files
committed
merge master
2 parents c178db7 + 61254a0 commit eda3868

File tree

111 files changed

+752
-382
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

111 files changed

+752
-382
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,5 @@ docs/_build
1010

1111
# Ignore files generated during build
1212
build/
13+
14+
venv/

.travis.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
sudo: false
22
language: python
3+
python:
4+
- "3.6"
35
install: pip install sphinx
4-
script:
5-
- make doctest
6-
- make html
6+
script:
7+
- make doctest
8+
- make html

CONTRIBUTING.md

Lines changed: 5 additions & 5 deletions

Readme.rst

Lines changed: 1 addition & 1 deletion

docs/404.rst

Lines changed: 25 additions & 0 deletions

docs/Makefile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,12 @@ dirhtml:
5959
@echo
6060
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
6161

62+
netlify: dirhtml
63+
@cp $(BUILDDIR)/dirhtml/404/index.html $(BUILDDIR)/dirhtml/404.html
64+
@sed -i -e 's/src="..\//src="\//g' $(BUILDDIR)/dirhtml/404.html
65+
@sed -i -e 's/href="..\//href="\//g' $(BUILDDIR)/dirhtml/404.html
66+
@cp _extra/* $(BUILDDIR)/dirhtml/
67+
6268
singlehtml:
6369
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
6470
@echo
@@ -175,3 +181,6 @@ pseudoxml:
175181
$(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
176182
@echo
177183
@echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."
184+
185+
serve:
186+
cd $(BUILDDIR)/dirhtml && python3 -m http.server 8005

docs/_extra/_redirects

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Redirect rules
2+
# Docs: https://www.netlify.com/docs/redirects/
3+
4+
# Redirect http to https (avoid one extra hop with an explicit rule for /en/latest/)
5+
http://docs.python-guide.org/en/latest/* https://docs.python-guide.org/:splat 301!
6+
http://docs.python-guide.org/* https://docs.python-guide.org/:splat 301!
7+
8+
# Redirect RTD prefix to /
9+
/en/latest/* /:splat 301!
10+
11+
# Redirect domain aliases to primary domain
12+
http://python-guide.org/* http://docs.python-guide.org/:splat 301!
13+
https://python-guide.org/* https://docs.python-guide.org/:splat 301!
14+
15+
# Redirect Netlify version to primary domain
16+
https://python-guide.netlify.com/* https://docs.python-guide.org/:splat 301!
17+
18+
/guide-book https://www.amazon.com/Hitchhikers-Guide-Python-Practices-Development/dp/1491933178/ref=as_li_ss_il?ie=UTF8&linkCode=li2&tag=bookforkind-20&linkId=804806ebdacaf3b56567347f3afbdbca 302

docs/_extra/ads.txt

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
google.com, pub-2802445174821308, RESELLER, f08c47fec0942fa0
2+
3+
4+
appnexus.com, 8692, DIRECT, f5ab79cb980f11d1
5+
6+
7+
districtm.io, 100835, DIRECT
8+
appnexus.com, 1908, RESELLER, f5ab79cb980f11d1
9+
google.com, pub-9685734445476814, RESELLER, f08c47fec0942fa0
10+
11+
12+
appnexus.com, 1613, reseller
13+
appnexus.com, 3326, reseller
14+
google.com, pub-1409765517756851, reseller
15+
google.com, pub-4075894099602271, reseller
16+
freewheel.tv, 146081, reseller
17+
rubiconproject.com, 8861, reseller, 0bfd66d529a55807
18+
19+
20+
aol.com, 11119, DIRECT
21+
adtech.com, 11341, DIRECT
22+
coxmt.com, 2000067907202, RESELLER
23+
Openx.com, 537143344, RESELLER
24+
indexexchange.com, 175407, RESELLER
25+
26+
27+
sonobi.com, 337f0e70cc, DIRECT
28+
rhythmone.com, 1059622079, RESELLER
29+
contextweb.com, 560606, RESELLER
30+
31+
32+
sovrn.com, 217352, DIRECT, fafdf38b16bf6b2b
33+
lijit.com, 217352, DIRECT, fafdf38b16bf6b2b
34+
openx.com, 537120960, RESELLER
35+
openx.com, 83499, RESELLER
36+
openx.com, 538959099, RESELLER
37+
pubmatic.com, 137711, RESELLER
38+
pubmatic.com, 156212, RESELLER
39+
pubmatic.com, 62483, RESELLER
40+
contextweb.com, 558511, RESELLER
41+
gumgum.com, 11645, RESELLER, ffdef49475d318a9
42+
43+
44+
openx.com, 539824308, RESELLER, 6a698e2ec38604c6
45+
46+
47+
rubiconproject.com, 17822, DIRECT, 0bfd66d529a55807
48+
49+
50+
gumgum.com, 13174, DIRECT, ffdef49475d318a9
51+
33across.com, 0013300001r0t9mAAA, RESELLER
52+
adtech.com, 9904, RESELLER
53+
Advertising.com, 16736, RESELLER
54+
aolcloud.net, 9904, RESELLER
55+
appnexus.com, 1001, RESELLER, f5ab79cb980f11d1
56+
appnexus.com, 1942, RESELLER, f5ab79cb980f11d1
57+
appnexus.com, 2758, RESELLER, f5ab79cb980f11d1
58+
appnexus.com, 3135, RESELLER, f5ab79cb980f11d1
59+
appnexus.com, 7597, RESELLER, f5ab79cb980f11d1
60+
bidtellect.com, 1407, RESELLER, 1c34aa2d85d45e93
61+
contextweb.com, 558355, RESELLER
62+
criteo.com, 109412, DIRECT, 9fac4a4a87c2a44f
63+
google.com, pub-3848273848634341, RESELLER, f08c47fec0942fa0
64+
google.com, pub-9557089510405422, RESELLER, f08c47fec0942fa0
65+
indexexchange.com, 177754, RESELLER, 50b1c356f2c5c8fc
66+
lkqd.com, 470, RESELLER, 59c49fa9598a0117
67+
lkqd.net, 470, RESELLER, 59c49fa9598a0117
68+
openx.com, 537120563, RESELLER, 6a698e2ec38604c6
69+
openx.com, 537149485, RESELLER, 6a698e2ec38604c6
70+
openx.com, 540003333, RESELLER, 6a698e2ec38604c6
71+
outbrain.com, 01a755b08c8c22b15d46a8b753ab6955d4, RESELLER
72+
outbrain.com, 01a755b08c8c22b15d46a8b753ab6955d4, DIRECT
73+
pubmatic.com, 50758, RESELLER, 5d62403b186f2ace
74+
revcontent.com, 76611, RESELLER
75+
rhythmone.com, 78519861, RESELLER
76+
smaato.com, 1100033117, RESELLER
77+
spotx.tv, 147949, RESELLER, 7842df1d2fe2db34
78+
spotxchange.com, 147949, RESELLER, 7842df1d2fe2db34
79+
springserve.com, 686, DIRECT, a24eb641fc82e93d
80+
81+
82+
indexexchange.com, 187196, DIRECT
83+
84+
rhythmone.com, 1059622079, RESELLER, a670c89d4a324e47
85+
contextweb.com, 560606, RESELLER, 89ff185a4c4e857
86+
ccoxmt.com, 2000067997702, RESELLER
87+
adtech.com, 11119, RESELLER
88+
33across.com, 0013300001r0t9mAAA, RESELLER
89+
adtech.com, 9904, RESELLER
90+
Advertising.com, 16736, RESELLER
91+
aolcloud.net, 9904, RESELLER
92+
appnexus.com, 7597, RESELLER, f5ab79cb980f11d1
93+
bidtellect.com, 1407, RESELLER, 1c34aa2d85d45e93
94+
contextweb.com, 558355, RESELLER
95+
criteo.com, 109412, DIRECT, 9fac4a4a87c2a44f
96+
indexexchange.com, 177754, RESELLER, 50b1c356f2c5c8fc
97+
lkqd.com, 470, RESELLER, 59c49fa9598a0117
98+
lkqd.net, 470, RESELLER, 59c49fa9598a0117
99+
outbrain.com, 01a755b08c8c22b15d46a8b753ab6955d4, RESELLER
100+
outbrain.com, 01a755b08c8c22b15d46a8b753ab6955d4, DIRECT
101+
revcontent.com, 76611, RESELLER
102+
smaato.com, 1100033117, RESELLER
103+
spotx.tv, 147949, RESELLER, 7842df1d2fe2db34
104+
spotxchange.com, 147949, RESELLER, 7842df1d2fe2db34
105+
springserve.com, 686, DIRECT, a24eb641fc82e93d

docs/_extra/robots.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
User-agent: *
2+
Disallow:

docs/_static/ad.png

-83.2 KB
Binary file not shown.

docs/_static/guide-book-cover.jpg

51.2 KB

docs/_static/social-card.jpg

75.2 KB

docs/_static/test

Whitespace-only changes.

docs/_templates/hacks.html

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1 @@
11
<!-- Alabaster (krTheme++) Hacks -->
2-
<aside id="python27">
3-
<a href="https://www.kennethreitz.org/requests3"><strong>Requests 3.0</strong> development is underway, and your financial help is appreciated!</a>
4-
</aside>
5-
6-
<!-- Python 2 Death Clock™ -->
7-
<style type="text/css">
8-
body { margin-top: 4em; }
9-
#python27 {
10-
position: fixed;
11-
top: 0;
12-
left: 0; right: 0;
13-
height: auto;
14-
text-align: center;
15-
color: white;
16-
background-color: black;
17-
font-size: larger;
18-
line-height: 3;
19-
}
20-
#python27 a {
21-
color: white;
22-
}
23-
24-
</style>
25-
<!-- <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.min.js"></script>
26-
<script>
27-
var death = new Date('2020-04-12');
28-
29-
var diff = moment.duration(death - moment());
30-
31-
document.querySelector('#python27 time').innerText = (diff.years() * 12) + diff.months();
32-
</script>
33-
-->
34-
<script type="text/javascript">
35-
var _gauges = _gauges || [];
36-
(function() {
37-
var t = document.createElement('script');
38-
t.type = 'text/javascript';
39-
t.async = true;
40-
t.id = 'gauges-tracker';
41-
t.setAttribute('data-site-id', '56ca79a64b2ffa7a470027ea');
42-
t.setAttribute('data-track-path', 'https://track.gaug.es/track.gif');
43-
t.src = 'https://d36ee2fcip1434.cloudfront.net/track.js';
44-
var s = document.getElementsByTagName('script')[0];
45-
s.parentNode.insertBefore(t, s);
46-
})();
47-
</script>

docs/_templates/layout.html

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
{% extends "!layout.html" %}
2+
3+
{%- block extrahead %}
4+
{# No super() because we want to avoid loading an empty custom.css file #}
5+
6+
{# <meta name="viewport" content="width=device-width, initial-scale=0.75, maximum-scale=0.75" /> #}
7+
8+
<meta name="viewport" content="width=device-width, initial-scale=1">
9+
<style>
10+
div.body {
11+
min-width: initial;
12+
max-width: initial;
13+
}
14+
</style>
15+
16+
{% if pagename == 'index' %}
17+
<link rel="canonical" href="https://docs.python-guide.org/"/>
18+
<meta property="og:url" content="https://docs.python-guide.org/">
19+
{% elif pagename == '404' %}
20+
{# No canonical on our 404 template. #}
21+
{% else %}
22+
<link rel="canonical" href="https://docs.python-guide.org/{{ pagename }}/"/>
23+
<meta property="og:url" content="https://docs.python-guide.org/{{ pagename }}">
24+
{% endif %}
25+
26+
<link rel="icon" type="image/png" href="https://media.readthedocs.org/images/favicon.png">
27+
28+
<meta name="google-site-verification" content="013PxE2_8KX9jdUSC5gr8QsfdxTXr1mFgmD9zplp5II" />
29+
30+
<meta name="twitter:card" content="summary">
31+
<meta property="twitter:image" content="https://docs.python-guide.org/_static/social-card.jpg">
32+
<meta property="og:image" content="https://docs.python-guide.org/_static/social-card.jpg">
33+
<meta property="og:title" content="{{ title }}{{ titlesuffix }}">
34+
<meta property="og:type" content="article">
35+
{%- if metatags is defined %}
36+
{# FIXME: For some reason the `meta` dict is always empty. Extract the desc from the `metatags` text. #}
37+
<meta property="og:description" content="{{ metatags[15:-24] }}">
38+
{%- endif %}
39+
40+
<script>window.rp_prop_id = '29182759436';</script>
41+
<script src="https://srv.realpython.net/tag.js" async></script>
42+
43+
<script src="https://d31vxm9ubutrmw.cloudfront.net/static/js/2169.js"></script>
44+
45+
{# Alabaster theme native GA integration is outdated (ga.js). #}
46+
{# Insert our own GA snippet instead. #}
47+
<script>
48+
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
49+
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
50+
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
51+
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
52+
53+
ga('create', 'UA-37242602-11', 'auto');
54+
ga('send', 'pageview');
55+
</script>
56+
{% endblock %}
57+
58+
{# From: https://github.com/bitprophet/alabaster/blob/5f249677242be96601e034edb3697b7482a6abcf/alabaster/layout.html #}
59+
{# Nav should appear before content, not after #}
60+
{%- block content %}
61+
{%- if theme_fixed_sidebar|lower == 'true' %}
62+
<div class="document">
63+
{{ sidebar() }}
64+
{%- block document %}
65+
<div class="documentwrapper">
66+
{%- if render_sidebar %}
67+
<div class="bodywrapper">
68+
{%- endif %}
69+
70+
{%- block relbar_top %}
71+
{%- if theme_show_relbar_top|tobool %}
72+
<div class="related top">
73+
&nbsp;
74+
{{- rellink_markup () }}
75+
</div>
76+
{%- endif %}
77+
{% endblock %}
78+
79+
<div class="body" role="main">
80+
<div style="display:block;position:relative; margin-bottom: 1em;">
81+
<div style="display:block;width:100%;padding-top:12.5%;"></div>
82+
<div class="rpad" data-unit="8x1" style="position:absolute;left:0;top:0;right:0;bottom:0;overflow:hidden;"></div>
83+
</div>
84+
{% block body %} {% endblock %}
85+
</div>
86+
87+
{%- block relbar_bottom %}
88+
{%- if theme_show_relbar_bottom|tobool %}
89+
<div class="related bottom">
90+
&nbsp;
91+
{{- rellink_markup () }}
92+
</div>
93+
{%- endif %}
94+
{% endblock %}
95+
96+
{%- if render_sidebar %}
97+
</div>
98+
{%- endif %}
99+
</div>
100+
{%- endblock %}
101+
<div class="clearer"></div>
102+
</div>
103+
{%- else %}
104+
{{ super() }}
105+
{%- endif %}
106+
{%- endblock %}
107+
108+
{%- block footer %}
109+
<div class="footer">
110+
<div style="text-align: center;" id="waldo-tag-2171"></div>
111+
{% if show_copyright %}<p>&copy;{{ copyright }}</p>{% endif %}
112+
</div>
113+
{% endblock %}

0 commit comments

Comments
 (0)