Programming w/Python and Django

Syllabus

Expand All | Contract All
  1. Python
    1. Before Day 1: Level Set
      1. What background do most students have?
      2. Bring all students up to the same level
    2. Setup, Getting Started
      1. Pieces of the Pie
        1. Python Language
        2. Standard Library
        3. Other libraries, modules, frameworks (like Django), etc.
      2. FOSS (Free and Open Source Software)
        1. Free Software Foundation, GNU, Linux, Apache, Python, Django, etc
        2. Google
        3. StackOverflow
          1. Once you have a basic understanding, you can find code to do almost anything, already written and ready for you to use/enhance/contribute
      3. Resources:
        1. https://python.org
          1. https://python.org/help
          2. https://python.org/search
          3. https://docs.python.org/tutorial
          4. https://docs.python.org/reference
          5. https://docs.python.org/library
            1. Built-in Functions = https://docs.python.org/library/functions.html
          6. modules = https://docs.python.org/py-modindex.html
          7. index = https://docs.python.org/genindex.html
          8. Search = https://docs.python.org/search.html
          9. https://docs.python.org/glossary.html
        2. http://rgruet.free.fr/PQR24/PQR2.4.html
          1. Excellent summary card
        3. https://wiki.python.org
          1. https://wiki.python.org/moin/BeginnersGuide/NonProgrammers
          2. https://wiki.python.org/moin/BeginnersGuide/Programmers
          3. https://wiki.python.org/moin/LanguageComparisons
          4. https://wiki.python.org/moin/BeginnersGuide/Download
        4. Community/Support
          1. https://www.python.org/community/lists/
          2. https://mail.python.org/mailman/listinfo/python-list
        5. https://docs.python.org/using
          1. Setup instructions
      4. Command line (Windows, Mac, Unix, or Linux)
        1. http://tutorial.djangogirls.org/en/intro_to_command_line/
      5. Install Python
        1. https://www.python.org/downloads/release/python-2711/
        2. https://developers.google.com/edu/python/set-up
        3. 2 Scoops Ch 2
        4. http://tutorial.djangogirls.org/en/installation/
        5. https://docs.python.org/using
      6. Run Python shell (REPL)
        1. % python
        2. % idle
        3. http://pythontutor.com/
      7. Install virtualenv and pip
      8. Create virtual environments
      9. pip freeze > requirements.txt
      10. pip install -r requirements.txt
      11. Install PyCharm
      12. Use PyCharm
        1. Create new file template
          1. from __future__ import unicode_literals
          2. from __future__ import print_function
          3. from __future__ import division
        2. Preferences
          1. Set tabs to 4 spaces
          2. Show margin 80 chars
          3. Show method separators
          4. etc
      13. Pythonic Thinking
        1. Guido van Rossum
        2. DRY
        3. There's one right (and obvious) way to do it
        4. >>> import this
        5. Batteries Included
          1. https://www.python.org/dev/peps/pep-0206/
        6. https://en.wikipedia.org/wiki/Python_(programming_language)
    3. Python Basics
      1. *.py and *.pyc files
        1. Virtual machine (VM), interpreter
        2. Bytecode
      2. Variables
        1. Indentifiers
          1. Case-sensitive
        2. No type specified
        3. _underscore variables
          1. Not imported by import *
          2. Don't call them or override them
        4. __double_underscore variables
          1. Class private name mangling
          2. Don't call them or override them
        5. __special_name_double_underscore__ variables
          1. Override them, don't call them
          2. Special names:
            1. https://docs.python.org/reference/datamodel.html#specialnames
            2. http://stackoverflow.com/questions/1301346/the-meaning-of-a-single-and-a-double-underscore-before-an-object-name-in-python
      3. Assignment
        1. Simple assignment
        2. Assigning multiple values
        3. Chaining assignment
        4. +=, -=, *=, /=, etc.
      4. Print
      5. Store program in a *.py file
      6. Run program from a file
      7. Debug with PyCharm
        1. Set breakpoint
        2. Step Over, Step Into, Resume
        3. Hover
        4. Local variables
        5. Watch
      8. Debug with Python Tutor
        1. http://pythontutor.com/
      9. Arithmetic operators
        1. Unary +, -
        2. +, -, *, /, //, %, **, pow(), abs(), int(), long(), float(), divmod()
      10. Boolean
        1. True, False
        2. and, or, not
        3. Short circuit
        4. bool()
      11. Bitwise
        1. ~, ^, &, |, <<, >>
      12. Strings and Numbers
        1. Strings
          1. Use "" or '' for single-line strings
          2. Use """ or ''' for multi-line strings
          3. Adjacent strings are concatenated
          4. Escapes: \n, \r, \t, \xnn, ...
          5. Strings are immutable lists
        2. Numbers
          1. Integer (aka Long): 12, 012, 0x12
            1. Unlimiited precision
          2. Float
          3. Decimal
          4. Complex
            1. x.real, x.imag
        3. Integer division
        4. Addition vs concatenation
        5. Duck typing
        6. Casting
      13. time module
      14. datetime module
      15. None
      16. Expressions
        1. Operator precedence
        2. Parentheses
        3. Truthiness
          1. https://docs.python.org/library/stdtypes.html#truth-value-testing
      17. Control statements
        1. Indentation
        2. If statement, comparisons
          1. if, elif, else
        3. For loop
          1. for x in list1
          2. for x in string1
          3. for x in range(start, end, step)
          4. for, break, continue, else
        4. While loop
          1. while, break, continue, else
        5. Pass
      18. Coding Style
        1. PEP 8
          1. 4 spaces, not tabs
          2. TitleCase, camelCase, snake_case
        2. Backslash to escape end of line
      19. Other PEP's (Python Enhancement Proposals)
        1. https://www.python.org/dev/peps/
        2. PEP 20 -- The Zen of Python
      20. Other operators
      21. Input
    4. Basic Containers: Lists and Dicts
      1. Lists
      2. Dicts
      3. Nested Lists and Dicts
      4. Indexing/Slicing Lists/Strings
        1. 0-based
        2. x[start:end+1:step]
        3. slice(start, end, step)
      5. Query
        1. in, not in
        2. min(), max()
      6. Adding items to Lists/Strings
        1. + (concatenate)
        2. * (repeat)
      7. Adding entries to Dicts
      8. Traversing Lists
      9. Traversing Dicts
      10. Traversing Strings
      11. Traversing Slices of Lists/Strings
      12. Iterable
      13. Length of List/String
        1. len()
      14. Removing items from Lists
        1. del
      15. Removing from Dicts
        1. del
      16. Combining Lists/Strings
        1. + (concatenate)
      17. String methods
        1. chr(), ord(), str()
        2. contains(), startswith(), endswith(), find(), rfind(), index(), rindex(), count()
        3. trim(), strip(), lstrip(), rstrip()
        4. ljust(), rjust(), center(), zfill()
        5. ialnum(), isalpha(), isdigit(), islower(), isupper(), isspace(), istitle()
        6. upper(), lower(), capitalize(), swapcase()
        7. expandtabs()
        8. reversed(), sorted()
        9. replace(), translate(), substitute()
        10. format()
          1. %[flag][width][.precision]s
          2. %[flag][width][.precision]d
          3. %[flag][width][.precision]f
          4. etc.
        11. parse()
        12. split(), rsplit(), splitlines()
        13. join()
        14. decode(), encode()
      18. List methods/operators
        1. list()
        2. list1[start:end+1:step] = list2
        3. append(list)
        4. extend(item)
        5. count(item)
        6. index()
        7. insert()
        8. remove()
        9. pop()
        10. reverse()
        11. sort()
        12. (tuple1, tuple2, tuple3, tuple4) = zip(seq1, seq2, seq3, ...)
      19. Dict methods/operators
        1. dict()
        2. in
        3. len()
        4. dict1[key]
        5. dict1[key] = value
        6. del dict1[key]
        7. clear()
        8. copy(), deepcopy()
        9. has_key(), items(), keys(), values()
        10. iteritems(), iterkeys(), itervalues()
        11. update()
        12. get(key, default), setdefault(key, default)
        13. pop(key, default), popitem()
      20. List Comprehensions
      21. Dict Comprehensions
      22. Set Comprehensions
    5. Functions
      1. Declaring Functions
        1. Parameters
          1. Positional parameters
          2. Immutable objects passed by value
          3. Mutable objects passed by reference
          4. Immutable strings
          5. Default values
            1. All parameters w/o default values first
            2. Then any parameters w/default values
            3. Mutable
            4. Changes persist to subsequent calls
            5. Initialized at declaration not call
        2. Return values
          1. Multiple return values
          2. Default return value
        3. Doc strings
          1. pydoc
        4. Positional arguments
        5. Keyword arguments
      2. Calling functions
        1. Default argument values
      3. Variable argument lists
        1. *args
          1. Declaring *args
            1. "*" is special.  "args" is just a convention
          2. Receiving *args (all undeclared positional args)
          3. Passing *args (any list/tuple)
          4. Unpacking *args (as a list)
          5. Passing on *args (modified or unmodified)
        2. **kwargs
          1. Declaring **kwargs
            1. "**" is special.  "kwargs" is just a convention
          2. Receiving **kwargs (all undeclared keyword args)
          3. Passing **kwargs (any dict)
          4. Unpacking **kwargs (as a dict)
          5. Passing on **kwargs (modified or unmodified)
    6. Classes
      1. Classes
        1. class Class1(ParentClass1)
      2. Properties
      3. Methods
        1. self parameter ("self" is convention only)
      4. @staticmethod
      5. @classmethod
      6. @property
      7. Object-Oriented Programming
      8. Inheritance from parent class
      9. Mix-ins from multiple parent classes
      10. __init__()
      11. __del__()
      12. super()
    7. Exceptions
      1. Predefined exceptions
      2. Declaring exceptions
      3. Raising exceptions
      4. Catching exceptions
        1. Try
        2. Except
        3. Finally
        4. Else
        5. Re-raising exceptions
      5. assert
    8. Modules
      1. Standard modules
        1. sys, os, os.path, shutil, stat, readline, tempfile, termios, tty
        2. string, re, StringIO
        3. math, random
        4. getopt, optparse, shlex
        5. time, datetime, calendar
        6. platform, commands, glob, mmap, msvcrt, popen2, syslog
        7. base64, binhex, crypt, bz2, gzip, md5, tarfile, zipfile, zipimport, zlib
        8. sets, collections, itertools
        9. imageop, imghdr
        10. sndhdr, sunau, sunaudio, wave, winsound
        11. socket, SocketServer
        12. email, poplib, imaplib, smtplib, smtpd, mailbox, mailcap, mhlib
        13. ftplib, gopherlib, nntplib, telnetlib
        14. xmllib, xml.dom, xml.sax, xmlrpclib
        15. htmllib, htmlentitydefs, markupbase, HTMLParser
        16. urllib, urllib2, urlparse, httplib, webbrowser
        17. SimpleHTTPServer, SimpleXMLRPCServer, Cookie
        18. gettext (internationalization)
        19. thread, threading
        20. inspect, token, tokenize, keyword, symbol, symtable, operator, parser, types, pprint, py_compile
        21. pdb, profile, pstats, trace, traceback
        22. pydoc
        23. test, unittest
        24. etc.
      2. Other modules
        1. PyPI (Python Package Index)
        2. Install via pip
      3. Import
        1. import module1
        2. from module1 import name1
        3. from module1 import *
        4. import module1 as alias1
      4. Use imported code
        1. module.name
        2. name
      5. Creating your own modules
        1. Module hierarchy
        2. Create a single-file module
        3. Create a multi-file module
          1. __init__.py
            1. Typically empty
            2. Can contain code
      6. Code executes during import
        1. Preventing execution on import
    9. Global variables
    10. Decorators
    11. Terminal I/O
      1. input(), raw_input()
      2. print()
    12. File I/O
      1. f = open(name)
        1. f.close()
        2. f.read(), f.readline(), f.readlines(), for line in f
        3. f.write(), f.writelines(),
        4. print(..., f=...) -- prints trailing newlines
        5. f.flush(), f.truncate()
        6. f.seek(), f.tell()
        7. for line in f:
      2. pathlib
      3. os.path
      4. shutil
      5. csv
    13. Advanced Containers: Tuples, Named Tuples, Sets
      1. Set methods/operators
        1. len()
        2. in, not in
        3. for item in set:
        4. add(), remove(), clear(), update()
        5. copy()
        6. issubset(), issuperset()
        7. &, intersection()
        8. |, union()
        9. -, difference()
        10. ^, symmetric_difference()
    14. Automated tests
      1. Agile
      2. TDD
      3. Doctests
      4. Unit tests
      5. - Python Assertions and methods
        1. assertEqual, assertNotEqual
        2. assertTrue, assertFalse
        3. assertIs, assertIsNot
        4. assertIsNone, assertIsNotNone
        5. assertIn, assertNotIn
        6. assertIsInstance, assertNotIsInstance
        7. assertRaises, assertRaisesRegexp
        8. assertAlmostEqual, assertNotAlmostEqual
        9. assertGreater, assertGreaterEqual, assertLess, assertLessEqual
        10. assertRegexpMatches, assertNotRegexpMatches,
        11. assertItemsEqual, assertDictContainsSubset
        12. maxDiff
      6. Setup/TearDown
        1. setUp(), tearDown()
        2. setUpClass(), tearDownClass()
        3. setUpModule(), tearDownModule()
    15. More Resources
      1. Docs
        1. Guide to the Python Standard Library
          1. http://www.effbot.org/zone/librarybook-index.htm
      2. 3rd party packages
        1. PyPI = Python Package Index
          1. https://www.python.org/pypi/
      3. Code Snippets
        1. http://code.activestate.com/recipes/langs/python
  2. Django
    1. Resources
      1. https://docs.djangoproject.com/en/dev/
    2. Setup
      1. Install Django framework via pip
      2. Install MySQL (or use SQLite for now?)
      3. http://tutorial.djangogirls.org/en/django_installation/
    3. Project Layout
      1. 2 Scoops Ch 3
      2. % django-admin.py startproject project1
      3. % python manage.py startapp app1
    4. Your First Django App
    5. Run via PyCharm
    6. Settings and Requirements Files
      1. 2 Scoops Ch 4
    7. HTTP Request/Response
      1. http://docs.djangoproject.com
      2. HttpRequest Methods:
        1. method, GET, POST, COOKIES, REQUEST, META
        2. is_ajax(), is_secure()
        3. path, path_info
        4. session
        5. user
        6. etc.
      3. HttpResponse Methods:
        1. write(), flush()
        2. has_header()
        3. etc.
    8. urls.py
      1. http://docs.djangoproject.com
      2. http://django-marcador.keimlink.de/en/urls_views.html#configure-the-urls
    9. View
      1. http://docs.djangoproject.com
      2. http://django-marcador.keimlink.de/en/urls_views.html#add-the-views
      3. redirect()
      4. render()
      5. reverse()
    10. Template
      1. http://docs.djangoproject.com
      2. HTML
        1. http://tutorial.djangogirls.org/en/html/
        2. https://www.codecademy.com/learn/web
      3. Beyond HTML
        1. Expressions {{ expression }}
        2. Tags: {% tag %}
        3. Filters: {{ expression|filter }}
        4.  
      4. Inheritance
        1. http://tutorial.djangogirls.org/en/template_extending/
        2. {% extends "base.html" %}
        3. {% block <name> %} ... {%endblock %}
      5. Loading tags
        1. {% load %}
      6. Including other templates
        1. {% include "other_template.html" %}
      7. Tags
        1. Predefined Tags
          1. comment/endcomment
          2. if/elif/else/endif , for/endfor
          3. url
        2. Custom Tags
      8. Filters
        1. Predefined Filters
          1. add, divisibleby,
          2. length length_is
          3. cut, slice, join
          4. date, time, floatformat, phone2numeric, timesince, timeuntil
          5. lower, upper, capfirst, pluralize, stringformat
          6. center, ljust, rjust
          7. truncatechars, truncatechars_html, truncatewords, truncatewords_html, wordcount, wordwrap
          8. safe, escape, escapejs, force_escape, fix_ampersands, striptags, removetags, urlencode, etc.
          9. urlize, urlizetrunc
          10. etc.
        2. Custom Filters
      9. CSS
        1. http://tutorial.djangogirls.org/en/css/
    11. Debugging missing pieces
      1. http://tutorial.djangogirls.org/en/extend_your_application/
    12. Model
      1. http://docs.djangoproject.com
      2. Fields
        1. Field Types
          1. CharField, IntegerField, FloatField, DecimalField
          2. BooleanField
          3. DateField, TimeField, DateTimeField, etc.
          4. ChoiceField, MultipleChoiceField, etc.
          5. EmailField, URLField, IPAddressField
          6. FileField, ImageField
        2. Field Options
          1. label, initial, required, widget, validators, etc.
        3. Widgets
          1. TextInput, Textarea, PasswordInput
          2. CheckboxInput, RadioSelect, CheckboxSelectMultiple, NullBooleanSelect
          3. DateInput, TimeInput, DateTimeInput, SelectDateWidget, etc.
          4. Select, SelectMultiple
          5. FileInput, ClearableFileInput
          6. HiddenInput, MultipleHiddenInput
          7. MultiWidget
      3. Meta class
    13. QuerySet
      1. http://docs.djangoproject.com
      2. http://tutorial.djangogirls.org/en/django_orm/
      3. Methods
        1. all()
        2. get()
        3. filter()
        4. get_or_create()
        5. count()
        6. create()
        7. update()
        8. delete()
        9. distinct()
        10. exclude()
        11. order_by()
        12. etc.
      4. Lookups
        1. gt, gte, lt, lte
        2. range
        3. isnull
        4. in, contains, exact, startswith, endswith
        5. icontains, iexact, istartswith, iendswith
        6. etc.
      5. Aggregation
        1. Count(), Sum(), Max(), Min(), Avg(), etc.
      6. Chaining querysets
      7. Q()
      8. Lazy Loading
    14. Form
      1. http://docs.djangoproject.com
      2. http://tutorial.djangogirls.org/en/django_forms/
      3. Defining Forms
      4. Using Forms in Templates
        1. {{ form }}
        2. {{ form.as_table }}
        3. {{ form.as_p }}
        4. {{ form.as_ul }}
        5. {{ form.field1 }}
        6. {{ form.field1.label }}
        7. {{ form.field1.value }}
        8. {{ form.field1.errors }}
      5. Handling Form Input
        1. Validating Data
          1. Validators
            1. Implicit
            2. Explicit
          2. is_valid()
          3. clean_xxx()
          4. clean()
        2. Saving Data
          1. save()
    15. ModelForm
      1. http://docs.djangoproject.com
    16. Polls tutorial
      1. http://docs.djangoproject.com
    17. Debugging
      1. PyCharm
      2. Firebug, Chrome Debugger, etc.
      3. Django Debug Toolbar
    18. Community/Support
      1. Google
      2. StackOverflow
      3. django-users mailing list
        1. Django-users list is very friendly. More than python-list.
      4. IRC (#python, #django)
      5. Meetups
      6. 2 Scoops Ch 31
      7. etc.
    19. Login Authentication
      1. @login_required
      2. request.user.is_authenticated()
    20. Django Development Server
    21. Formset
    22. Logging
      1. 2 Scoops Ch 24
      2. Fred's logging
    23. Automated Tests
      1. http://docs.djangoproject.com
      2. 2 Scoops Ch 20
      3. Running Tests
        1. % python manage.py help test
        2. % python manage.py test
          1. Run all test methods in all test classes of all apps
        3. python manage.py test -v2
          1. More verbose (levels 0-3)
        4. % python manage.py test -v2 appname...
          1. Run all test methods in all test classes of specified apps
        5. % python manage.py test -v3 appname...
          1. Shows ALL steps.  Too much detail for typical use
        6. % python manage.py test -v2 appname.TestClass...
          1. Run all test methods in specified test classes
        7. % python manage.py test -v2 appname.TestClass.test_name...
          1. Run specified test methods
      4. Writing Tests
        1. Create tests.py in each app
        2. Inherit from django.test.TestCase
          1. Or django.test.SimpleTestCase if no DB access needed
        3. Django asserts
          1. assertContains, assertNotContains
          2. assertHTMLEqual, assertHTMLNotEqual
          3. assertXMLEqual, assertXMLNotEqual
          4. assertQuerysetEqual
          5. assertRedirects
          6. assertTemplateUsed, assertTemplateNotUsed
          7. assertFormError, assertRaisesMessage
        4. django.test.client
          1. response = self.client.get('/customer/details/')
      5. Test DB
        1. Creates/deletes "test_" DB.  Does not touch real DB.
        2. For speed use SQlite, not MySQL
      6. Django suppresses all outgoing email during tests
      7. Debugging tests in PyCharm
      8. Test Coverage
    24. Migrations
      1. http://docs.djangoproject.com
      2. https://helphopelive.atlassian.net/wiki/display/HHLWEB/Migration+Basics
      3. inspectdb
      4. syncdb (before South)
      5. South Migrations (before Django 1.7)
        1. Converting an app to use South instead of syncdb
          1. One-liner
            1. % python manage.py convert_to_south <app_name>
          2. Two-Liner
            1. python manage.py schemamigration <app_name> --initial
            2. % python manage.py migrate <app_name>
        2. Schema migrations
          1. Create/change models
          2. % python manage.py schemamigration <app_name> --auto
        3. Data Migrations
          1. % python manage.py datamigration <app_name> <migration_base_name>
          2. Edit the generated file, adding code to forwards() and backwards()
        4. Migrating forwards or backwards to a specific migration
          1. % python manage.py migrate <app_name> <migration_number>
        5. Migrating all apps to the latest migration for each
          1. % python manage.py migrate --all
        6. Faking a migration (because the change has already been made to the DB)
          1. % python manage.py migrate <app_name> <migration_number> --fake
      6. Django Migrations (Django 1.7 and later)
        1. Same author as South
      7. https://helphopelive.atlassian.net/wiki/display/HHLWEB/Rules+of+Migrations
    25. Security
      1. http://docs.djangoproject.com
      2. 2 Scoops Ch 23
    26. Performance
      1. http://docs.djangoproject.com
      2. 2 Scoops Ch 22
    27. Middleware
    28. 3rd Party Packages
      1. 2 Scoops Ch 19
    29. More Resources:
      1. Docs
        1. http://django.readthedocs.io/
        2. http://www.revsys.com/django/cheatsheet/
      2. Tutorials:
        1. http://django-marcador.keimlink.de/en/admin.html
        2. https://github.com/vitorfs/bootcamp
        3. http://www.marinamele.com/taskbuster-django-tutorial
        4. https://tutorial.djangogirls.org/
        5. https://developer.mozilla.org/en-US/docs/Learn/Server-side/Django
      3. 3rd party packages
        1. https://www.djangopackages.com/
      4. Code Snippets
        1. https://djangosnippets.org/
  3. Possible Advanced Python Topics
    1. Logging
      1. https://docs.python.org/3/howto/logging.html
    2. Advanced loops
      1. for loop with index also
        1. for index, value in enumerate(list):
          1. http://treyhunner.com/2016/04/how-to-loop-with-indexes-in-python/
      2. for loop over 2 lists at once
        1. for color, ratio in zip(colors, ratios):
          1. http://treyhunner.com/2016/04/how-to-loop-with-indexes-in-python/
      3. iter()
        1. http://treyhunner.com/2016/12/python-iterator-protocol-how-for-loops-work/
      4. iterables, iterators, generators
        1. http://nedbatchelder.com/text/iter.html
    3. hasattr(), getattr(), setattr(), delattr(), dir(), locals(), globals(), vars(), help()
    4. callable(), filter()
    5. exec, execfile(), eval(), compile(), reload()
    6. Python scripts (Linux, Unix, Mac, Windows?)
      1. Shebang for Linux, Unix, Mac
      2. ASSOC and FTYPE for Windows
        1. https://docs.python.org/2/using/windows.html#executing-scripts
    7. Python 3
      1. Why you should use Python 3:
        1. https://eev.ee/blog/2016/07/31/python-faq-why-should-i-use-python-3/
          1. Unicode strings
          2. Set literals
          3. Dict and set comprehensions
          4. Multi-with
          5. print()
          6. collections.OrderedDict
          7. collections.Counter
          8. argparse module improves on optparse
          9. Everything is lazy
          10. Unpacking via * and **
          11. yield from
          12. Keyword-only arguments
          13. Format strings via (f"")
          14. async and await keywords
          15. Function annotations
          16. Matrix multiplication via @
          17. Ellipsis via ...
          18. Enhanced exceptions
            1. __traceback__ and .with_traceback() instead of sys.exc_info()
            2. exception chaining via raise from
          19. super() with no arguments
          20. New metaclass syntax and kwargs for classes
          21. __prepare__
          22. Attribute definition order
          23. __set_name__()
          24. __init_subclass__()
          25. int is long
          26. / does float division, not integer division, use // for integer division
          27. Other math stuff
          28. Modules shuffled:
            1. StringIO.StringIO --> io.StringIO
            2. SimpleHTTPServer.SimpleHTTPServer --> http.server
            3. pickle/cPickle --> pickle
            4. profile/cProfile --> profile
            5. StringIO/cStringIO --> StringIO
          29. bz2 and gzip improvements
          30. collections.ChainMap
          31. ConfigParser/SafeConfigParser --> ConfigParser
          32. contextlib.ContextDecorator
          33. @contextmanager
          34. contextlib improvements
          35. datetime improvements
          36. functools improvements
          37. inspect improvements
          38. logging improvements
          39. os.scandir is faster
          40. re.fullmatch
          41. shutil.disk_usage()
          42. shutil.get_terminal_size()
          43. subprocess.run()
          44. tempfile.TemporaryDirectory context manager
          45. textwrap.indent()
          46. time improvements
          47. traceback improvements
          48. types improvements
          49. weakref.finalize()
          50. asyncio module
          51. enum module
          52. ipaddress module
          53. pathlib module
          54. selectors module
          55. statistics module
          56. unittest.mock module
          57. faulthandler module
          58. importlib module
          59. tracemalloc module
          60. typing module
          61. venv module
          62. ensurepip module
          63. zipapp module
          64. tab-completion in REPL
          65. __qualname__
          66. Implicit namespace packages
          67. Object finalization improvements
          68. str.format_map()
          69. OSError
          70. ResourceWarning
          71. hasattr() propagates errors better
          72. Hash randomization is on by default
          73. List comprehensions no longer leak their loop variables into the enclosing scope
          74. nonlocal
          75. TypeError during compare
          76. !=
          77. Can access a method as a class attribute
          78. input/raw_input --> input
          79. Speed improvements
        2. http://www.itworld.com/article/3149782/application-development/python-36-is-packed-with-goodness.html
      2. What was removed/changed in Python 3 (how to port from Python 2):
        1. https://eev.ee/blog/2016/07/31/python-faq-how-do-i-port-to-python-3/
      3. Why you should NOT use Python 3:
        1. https://learnpythonthehardway.org/book/nopython3.html
      4. Why you SHOULD used Python 3 after all:
        1. https://eev.ee/blog/2016/11/23/a-rebuttal-for-python-3/
      5. What libraries support Python 3:
        1. http://py3readiness.org/
      6. Python 2 and 3 release notes:
        1. https://docs.python.org/3/whatsnew/
      7. Why Python 3 was created:
        1. http://python-notes.curiousefficiency.org/en/latest/python3/questions_and_answers.html
    8. Python features specific to MS Windows:
      1. https://docs.python.org/2/library/windows.html#mswin-specific-services
      2. py2exe
    9. Python 3 on MS Windows
      1. https://docs.python.org/3/using/windows.html
    10. Recursion
      1. Iteration vs Recursion
    11. Context Managers
      1. With statement
    12. RTTI (Run-Time Type Identification)
      1. type()
      2. isinstance()
      3. issubclass()
      4. __name__
      5. __class__
      6. __module__
      7. __file__
      8. im_class, im_self, im_func
    13. Regular Expressions
      1. https://pycon2016.regex.training/
    14. Nested Functions
    15. Anonymous Functions
    16. Closures
    17. Lambdas
    18. The rest of the Python Standard Library
      1. https://docs.python.org/library/
    19. Operator Overriding
    20. Multiple statements on one line
      1. print("foo"); print("bar"); print("semicolon is the separator")
    21. JSON
      1. dict1 = json.loads("String of JSON")
      2. str1 = json.dumps(dict1)
      3. json.dump(dict1, fp=file1)
      4. import json; help(json)
    22. Python Parameter Passing
      1. https://eev.ee/blog/2012/05/23/python-faq-passing/
  4. Possible Advanced Django Topics
    1. Deploying to Production
      1. Apache and collectstatic
        1. 2 Scoops Ch 27, 28
        2. Fred's pub script
      2. Heroku
      3. PythonAnywhere
        1. http://tutorial.djangogirls.org/en/deploy/
    2. Advanced ORM
    3. Managers
    4. DB Routers
    5. XML, JSON, SOAP, REST
      1. 2 Scoops Ch 14, 15
    6. Class-Based Views
    7. Admin site
      1. http://django-marcador.keimlink.de/en/admin.html
    8. Internationalization
      1. 2 Scoops Appendix D
    9. Pagination
    10. Sending email
    11. SEO
      1. Sitemaps
    12. Test Coverage
    13. Performance Profiling
    14. Signals
  5. Possible Related Topics
    1. JIRA -- Bug/feature tracking
    2. Git -- Version control
      1. http://tutorialzine.com/2016/06/learn-git-in-30-minutes/
      2. http://book.git-scm.com/
      3. https://git-scm.com/
    3. Cloud Computing
    4. Jenkins -- Continuous Integration
    5. Docker
      1. 2 Scoops Ch 29
    6. Big Data
      1. Map/Reduce
        1. Python's map(), reduce()
    7. Mobile Computing
    8. REST Web Services
(Version 0.6 -- 4/16/2017)