Skip to content

Commit d4004f6

Browse files
committed
add resource from pr mattmakai#137
1 parent eafc664 commit d4004f6

File tree

2 files changed

+58
-0
lines changed

2 files changed

+58
-0
lines changed

content/pages/04-web-development/02-django.markdown

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,11 @@ since then.
7979
is a great tutorial that doesn't assume any prior knowledge of Python or
8080
Django while helping you build your first web application.
8181

82+
* [Django OverIQ](https://overiq.com/django/1.10/intro-to-django) is a
83+
project-based tutorial for beginners that covers the required features
84+
such as the [Django ORM](/django-orm.html) and
85+
[Django Templates](/django-templates.html).
86+
8287
* [2 Scoops of Django](https://www.twoscoopspress.com/collections/django/products/two-scoops-of-django-1-11)
8388
by Daniel Greenfeld and Audrey Roy is well worth the price of admission if
8489
you're serious about learning how to correctly develop Django websites.

post.py

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
import argparse
2+
3+
4+
"""Automates posting to social channels and tutorials page on
5+
fullstackpython.com.
6+
7+
Arguments:
8+
9+
-c, --channel which channel to post to, options are "all", "twitter",
10+
"facebook", "tutorials"
11+
12+
-s, --subject custom subject line for the posting, otherwise <h1>
13+
element's content will be used
14+
15+
-t, --tags tags for tutorials page
16+
17+
18+
Examples:
19+
20+
1. Post URL to all channels with the default title found within the page's
21+
<h1> and tagged with any keywords that match between the page content
22+
and the table of contents map.
23+
24+
python post.py https://www.fullstackpython.com/django.html
25+
26+
27+
2. Post URL to all channels with the default title found within the page's
28+
<h1> and tagged "git" and "source control".
29+
30+
python post.py https://www.fullstackpython.com/git.html "git, source control"
31+
32+
33+
3. Post URL to all channels with a custom description of "Newest Mapbox
34+
tutorial is live!" and tagged "django", "web development" and
35+
"web frameworks".
36+
37+
python post.py https://www.fullstackpython.com/blog/maps-django-web-applications-projects-mapbox.html "django, web development, web frameworks" -d "Newest Mapbox tutorial is live!"
38+
39+
40+
4. Post URL only to Twitter with a custom description of "An overview of relational databases for Python."
41+
42+
python post.py https://www.fullstackpython.com/databases.html "postgresql, mysql" -d "An overview of relational databases for Python." -c twitter
43+
"""
44+
45+
parser = argparse.ArgumentParser(description='Post a tutorial.')
46+
parser.add_argument('url', metavar='1', type=str, nargs='?',
47+
help='URL for the tutorial to post')
48+
parser.add_argument("-c", "--channel", help="channel to post tutorial to")
49+
50+
51+
args = parser.parse_args()
52+
print(args.url)
53+
print(args.channel)

0 commit comments

Comments
 (0)