├── resources ├── session09 │ └── mysite │ │ ├── myblog │ │ ├── __init__.py │ │ ├── migrations │ │ │ ├── __init__.py │ │ │ ├── 0002_category.py │ │ │ └── 0001_initial.py │ │ ├── urls.py │ │ ├── templates │ │ │ ├── detail.html │ │ │ └── list.html │ │ ├── models.py │ │ ├── views.py │ │ ├── fixtures │ │ │ └── myblog_test_fixture.json │ │ ├── admin.py │ │ ├── static │ │ │ └── django_blog.css │ │ └── tests.py │ │ ├── mysite │ │ ├── __init__.py │ │ ├── templates │ │ │ ├── login.html │ │ │ └── base.html │ │ ├── wsgi.py │ │ ├── urls.py │ │ └── settings.py │ │ └── manage.py ├── session08 │ ├── mysite_stage_1 │ │ ├── myblog │ │ │ ├── __init__.py │ │ │ ├── migrations │ │ │ │ ├── __init__.py │ │ │ │ ├── 0002_category.py │ │ │ │ └── 0001_initial.py │ │ │ ├── views.py │ │ │ ├── apps.py │ │ │ ├── admin.py │ │ │ ├── tests.py │ │ │ ├── models.py │ │ │ └── fixtures │ │ │ │ └── myblog_test_fixture.json │ │ ├── mysite │ │ │ ├── __init__.py │ │ │ ├── wsgi.py │ │ │ └── urls.py │ │ └── manage.py │ ├── mysite_stage_2 │ │ ├── myblog │ │ │ ├── __init__.py │ │ │ ├── migrations │ │ │ │ ├── __init__.py │ │ │ │ ├── 0002_category.py │ │ │ │ └── 0001_initial.py │ │ │ ├── apps.py │ │ │ ├── admin.py │ │ │ ├── urls.py │ │ │ ├── templates │ │ │ │ └── list.html │ │ │ ├── views.py │ │ │ ├── models.py │ │ │ ├── fixtures │ │ │ │ └── myblog_test_fixture.json │ │ │ └── tests.py │ │ ├── mysite │ │ │ ├── __init__.py │ │ │ ├── templates │ │ │ │ └── base.html │ │ │ ├── wsgi.py │ │ │ └── urls.py │ │ └── manage.py │ ├── mysite_stage_3 │ │ ├── myblog │ │ │ ├── __init__.py │ │ │ ├── migrations │ │ │ │ ├── __init__.py │ │ │ │ ├── 0002_category.py │ │ │ │ └── 0001_initial.py │ │ │ ├── apps.py │ │ │ ├── admin.py │ │ │ ├── urls.py │ │ │ ├── templates │ │ │ │ ├── detail.html │ │ │ │ └── list.html │ │ │ ├── models.py │ │ │ ├── views.py │ │ │ ├── fixtures │ │ │ │ └── myblog_test_fixture.json │ │ │ ├── static │ │ │ │ └── django_blog.css │ │ │ └── tests.py │ │ ├── mysite │ │ │ ├── __init__.py │ │ │ ├── templates │ │ │ │ ├── login.html │ │ │ │ └── base.html │ │ │ ├── wsgi.py │ │ │ └── urls.py │ │ └── manage.py │ ├── myblog_test_fixture.json │ └── django_blog.css ├── session07 │ ├── learning_journal │ │ ├── Procfile │ │ ├── runtime.txt │ │ ├── learning_journal │ │ │ ├── scripts │ │ │ │ ├── __init__.py │ │ │ │ └── initializedb.py │ │ │ ├── static │ │ │ │ ├── pyramid.png │ │ │ │ ├── pyramid-16x16.png │ │ │ │ └── theme.min.css │ │ │ ├── security.py │ │ │ ├── templates │ │ │ │ ├── edit.jinja2 │ │ │ │ ├── detail.jinja2 │ │ │ │ ├── layout.jinja2 │ │ │ │ └── list.jinja2 │ │ │ ├── forms.py │ │ │ ├── tests.py │ │ │ ├── __init__.py │ │ │ └── models.py │ │ ├── CHANGES.txt │ │ ├── .gitignore │ │ ├── run │ │ ├── build_db │ │ ├── MANIFEST.in │ │ ├── runapp.py │ │ ├── README.txt │ │ ├── requirements.txt │ │ ├── setup.py │ │ ├── production.ini │ │ └── development.ini │ ├── detail.jinja2 │ ├── forms.py │ ├── views.py │ └── models.py ├── session06 │ ├── learning_journal │ │ ├── .gitignore │ │ ├── learning_journal │ │ │ ├── scripts │ │ │ │ ├── __init__.py │ │ │ │ └── initializedb.py │ │ │ ├── static │ │ │ │ ├── pyramid.png │ │ │ │ ├── pyramid-16x16.png │ │ │ │ ├── styles.css │ │ │ │ └── theme.min.css │ │ │ ├── templates │ │ │ │ ├── detail.jinja2 │ │ │ │ ├── list.jinja2 │ │ │ │ ├── edit.jinja2 │ │ │ │ └── layout.jinja2 │ │ │ ├── forms.py │ │ │ ├── __init__.py │ │ │ ├── views.py │ │ │ ├── tests.py │ │ │ └── models.py │ │ ├── CHANGES.txt │ │ ├── MANIFEST.in │ │ ├── README.txt │ │ ├── setup.py │ │ ├── production.ini │ │ └── development.ini │ ├── forms.py │ ├── layout.jinja2 │ ├── __init__.py │ ├── styles.css │ ├── models.py │ └── development.ini ├── session03 │ ├── cgi │ │ ├── cgi-bin │ │ │ ├── cgi_1.py │ │ │ ├── cgi_sums.py │ │ │ └── cgi_2.py │ │ └── index.html │ └── wsgi │ │ ├── bookapp.py │ │ ├── wsgi_1.py │ │ └── bookdb.py ├── session02 │ ├── homework │ │ ├── webroot │ │ │ ├── sample.txt │ │ │ ├── images │ │ │ │ ├── sample_1.png │ │ │ │ ├── JPEG_example.jpg │ │ │ │ └── Sample_Scene_Balls.jpg │ │ │ ├── a_web_page.html │ │ │ └── make_time.py │ │ ├── simple_client.py │ │ └── http_server.py │ ├── simple_client.py │ └── http_server.py ├── session01 │ ├── socket_tools.py │ ├── tests.py │ ├── tasks.txt │ └── echo_client.py └── session04 │ ├── mashup_1.py │ ├── mashup_2.py │ └── mashup_3.py ├── source ├── _themes │ ├── uwpce_slides2 │ │ ├── title_slide.html │ │ ├── static │ │ │ ├── js │ │ │ │ ├── prettify │ │ │ │ │ ├── lang-go.js │ │ │ │ │ ├── lang-ml.js │ │ │ │ │ ├── lang-vb.js │ │ │ │ │ ├── lang-lua.js │ │ │ │ │ ├── lang-sql.js │ │ │ │ │ ├── lang-tex.js │ │ │ │ │ ├── lang-vhdl.js │ │ │ │ │ ├── lang-wiki.js │ │ │ │ │ ├── lang-apollo.js │ │ │ │ │ ├── lang-scala.js │ │ │ │ │ ├── lang-proto.js │ │ │ │ │ ├── lang-yaml.js │ │ │ │ │ ├── lang-hs.js │ │ │ │ │ ├── prettify.css │ │ │ │ │ ├── lang-lisp.js │ │ │ │ │ ├── lang-css.js │ │ │ │ │ ├── lang-n.js │ │ │ │ │ └── lang-clj.js │ │ │ │ ├── slide-testing.js │ │ │ │ ├── slides.js │ │ │ │ ├── slide-deck-instantiate.js │ │ │ │ ├── polyfills │ │ │ │ │ ├── dataset.min.js │ │ │ │ │ └── classList.min.js │ │ │ │ └── order.js │ │ │ ├── scripts │ │ │ │ └── md │ │ │ │ │ ├── README.md │ │ │ │ │ ├── slides.md │ │ │ │ │ └── render.py │ │ │ ├── .sass-cache │ │ │ │ ├── 17d03613c125918cd0766f51918feb21dc3c074a │ │ │ │ │ ├── _box.scssc │ │ │ │ │ ├── _columns.scssc │ │ │ │ │ ├── _images.scssc │ │ │ │ │ ├── _transform.scssc │ │ │ │ │ ├── _box-shadow.scssc │ │ │ │ │ ├── _box-sizing.scssc │ │ │ │ │ ├── _text-shadow.scssc │ │ │ │ │ ├── _transition.scssc │ │ │ │ │ ├── _border-radius.scssc │ │ │ │ │ ├── _user-interface.scssc │ │ │ │ │ ├── _background-size.scssc │ │ │ │ │ └── _deprecated-support.scssc │ │ │ │ ├── a3714e1b6bb8b987fa4c7e14e1704c7e18bb1783 │ │ │ │ │ ├── _base.scssc │ │ │ │ │ ├── phone.scssc │ │ │ │ │ ├── default.scssc │ │ │ │ │ ├── io2013.scssc │ │ │ │ │ ├── _variables.scssc │ │ │ │ │ └── hieroglyph.scssc │ │ │ │ ├── 0fe24dfc41fffed2d6891c797fcd7dee100afa65 │ │ │ │ │ └── _hacks.scssc │ │ │ │ ├── af1a5722249b61fe97c5776f7a26e0902a00f406 │ │ │ │ │ ├── _support.scssc │ │ │ │ │ └── _reset.scssc │ │ │ │ └── 65e4c30c131f260ea88c3e4f2e16dfc2ba547e74 │ │ │ │ │ └── _utilities.scssc │ │ │ ├── theme │ │ │ │ ├── css │ │ │ │ │ ├── phone.css │ │ │ │ │ ├── io2013.css │ │ │ │ │ └── hieroglyph.css │ │ │ │ └── scss │ │ │ │ │ ├── _variables.scss │ │ │ │ │ ├── phone.scss │ │ │ │ │ ├── io2013.scss │ │ │ │ │ └── hieroglyph.scss │ │ │ ├── config.rb │ │ │ ├── slide_config.js_t │ │ │ └── slide_config.js │ │ ├── theme.conf │ │ ├── end_slide.html │ │ └── slide.html │ └── uwpce_theme │ │ ├── theme.conf │ │ ├── static │ │ ├── footerbg.png │ │ ├── headerbg.png │ │ ├── middlebg.png │ │ ├── dialog-note.png │ │ ├── dialog-todo.png │ │ ├── dialog-topic.png │ │ ├── transparent.gif │ │ ├── dialog-seealso.png │ │ ├── dialog-warning.png │ │ └── ie6.css │ │ └── layout.html ├── _static │ ├── bike.jpg │ ├── icup.png │ ├── apache.png │ ├── nginx.png │ ├── python.png │ ├── scream.jpg │ ├── by-nc-sa.png │ ├── data_flow.png │ ├── forbidden.png │ ├── gateway.jpg │ ├── lj_entry.png │ ├── logo_UW.png │ ├── mac-icon.png │ ├── no_entry.jpg │ ├── protocol.png │ ├── admin_index.png │ ├── cloud_cover.jpg │ ├── django-pony.png │ ├── django_lead.png │ ├── flask_cover.png │ ├── flask_full.png │ ├── flask_hello.png │ ├── geojson-io.png │ ├── heroku-logo.png │ ├── nginx_hello.png │ ├── proxy_wsgi.png │ ├── skateboard.jpg │ ├── bluebox_logo.png │ ├── cgitb_output.png │ ├── django-start.png │ ├── flask_square.png │ ├── granny_mashup.png │ ├── mod_wsgi_flow.png │ ├── protocol_sea.png │ ├── pyramid-medium.png │ ├── sheep_pyramid.jpg │ ├── wiki_frontpage.png │ ├── wsgiref_flow.png │ ├── framework_quote.png │ ├── network_topology.png │ ├── plone_conf_2012.jpg │ ├── data_in_tcpip_stack.png │ ├── django-admin-login.png │ ├── socket_interaction.png │ ├── wsgi_middleware_onion.png │ ├── learning_journal_styled.png │ └── plone-icon-256-white-bg.png ├── _templates │ ├── end_slide.html │ └── title_slide.html └── presentations │ └── index.rst ├── docutils.conf ├── requirements.pip └── .gitignore /resources/session09/mysite/myblog/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /resources/session09/mysite/mysite/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /source/_themes/uwpce_slides2/title_slide.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /resources/session08/mysite_stage_1/myblog/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /resources/session08/mysite_stage_1/mysite/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /resources/session08/mysite_stage_2/myblog/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /resources/session08/mysite_stage_2/mysite/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /resources/session08/mysite_stage_3/myblog/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /resources/session08/mysite_stage_3/mysite/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /resources/session09/mysite/myblog/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /resources/session07/learning_journal/Procfile: -------------------------------------------------------------------------------- 1 | web: ./run 2 | -------------------------------------------------------------------------------- /resources/session07/learning_journal/runtime.txt: -------------------------------------------------------------------------------- 1 | python-3.5.0 2 | -------------------------------------------------------------------------------- /resources/session08/mysite_stage_1/myblog/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /resources/session08/mysite_stage_2/myblog/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /resources/session08/mysite_stage_3/myblog/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /resources/session06/learning_journal/.gitignore: -------------------------------------------------------------------------------- 1 | *.pyc 2 | .DS_Store 3 | *.egg-info 4 | -------------------------------------------------------------------------------- /resources/session06/learning_journal/learning_journal/scripts/__init__.py: -------------------------------------------------------------------------------- 1 | # package 2 | -------------------------------------------------------------------------------- /resources/session07/learning_journal/learning_journal/scripts/__init__.py: -------------------------------------------------------------------------------- 1 | # package 2 | -------------------------------------------------------------------------------- /resources/session06/learning_journal/CHANGES.txt: -------------------------------------------------------------------------------- 1 | 0.0 2 | --- 3 | 4 | - Initial version 5 | -------------------------------------------------------------------------------- /resources/session07/learning_journal/CHANGES.txt: -------------------------------------------------------------------------------- 1 | 0.0 2 | --- 3 | 4 | - Initial version 5 | -------------------------------------------------------------------------------- /resources/session07/learning_journal/.gitignore: -------------------------------------------------------------------------------- 1 | *.pyc 2 | .DS_Store 3 | *.egg-info 4 | *.sqlite 5 | -------------------------------------------------------------------------------- /resources/session03/cgi/cgi-bin/cgi_1.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | import cgi 3 | 4 | 5 | cgi.test() 6 | -------------------------------------------------------------------------------- /resources/session07/learning_journal/run: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | python setup.py develop 3 | python runapp.py 4 | -------------------------------------------------------------------------------- /source/_static/bike.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UWPCE-PythonCert/training.python_web/HEAD/source/_static/bike.jpg -------------------------------------------------------------------------------- /source/_static/icup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UWPCE-PythonCert/training.python_web/HEAD/source/_static/icup.png -------------------------------------------------------------------------------- /source/_static/apache.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UWPCE-PythonCert/training.python_web/HEAD/source/_static/apache.png -------------------------------------------------------------------------------- /source/_static/nginx.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UWPCE-PythonCert/training.python_web/HEAD/source/_static/nginx.png -------------------------------------------------------------------------------- /source/_static/python.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UWPCE-PythonCert/training.python_web/HEAD/source/_static/python.png -------------------------------------------------------------------------------- /source/_static/scream.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UWPCE-PythonCert/training.python_web/HEAD/source/_static/scream.jpg -------------------------------------------------------------------------------- /resources/session08/mysite_stage_1/myblog/views.py: -------------------------------------------------------------------------------- 1 | from django.shortcuts import render 2 | 3 | # Create your views here. 4 | -------------------------------------------------------------------------------- /source/_static/by-nc-sa.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UWPCE-PythonCert/training.python_web/HEAD/source/_static/by-nc-sa.png -------------------------------------------------------------------------------- /source/_static/data_flow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UWPCE-PythonCert/training.python_web/HEAD/source/_static/data_flow.png -------------------------------------------------------------------------------- /source/_static/forbidden.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UWPCE-PythonCert/training.python_web/HEAD/source/_static/forbidden.png -------------------------------------------------------------------------------- /source/_static/gateway.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UWPCE-PythonCert/training.python_web/HEAD/source/_static/gateway.jpg -------------------------------------------------------------------------------- /source/_static/lj_entry.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UWPCE-PythonCert/training.python_web/HEAD/source/_static/lj_entry.png -------------------------------------------------------------------------------- /source/_static/logo_UW.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UWPCE-PythonCert/training.python_web/HEAD/source/_static/logo_UW.png -------------------------------------------------------------------------------- /source/_static/mac-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UWPCE-PythonCert/training.python_web/HEAD/source/_static/mac-icon.png -------------------------------------------------------------------------------- /source/_static/no_entry.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UWPCE-PythonCert/training.python_web/HEAD/source/_static/no_entry.jpg -------------------------------------------------------------------------------- /source/_static/protocol.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UWPCE-PythonCert/training.python_web/HEAD/source/_static/protocol.png -------------------------------------------------------------------------------- /source/_static/admin_index.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UWPCE-PythonCert/training.python_web/HEAD/source/_static/admin_index.png -------------------------------------------------------------------------------- /source/_static/cloud_cover.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UWPCE-PythonCert/training.python_web/HEAD/source/_static/cloud_cover.jpg -------------------------------------------------------------------------------- /source/_static/django-pony.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UWPCE-PythonCert/training.python_web/HEAD/source/_static/django-pony.png -------------------------------------------------------------------------------- /source/_static/django_lead.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UWPCE-PythonCert/training.python_web/HEAD/source/_static/django_lead.png -------------------------------------------------------------------------------- /source/_static/flask_cover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UWPCE-PythonCert/training.python_web/HEAD/source/_static/flask_cover.png -------------------------------------------------------------------------------- /source/_static/flask_full.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UWPCE-PythonCert/training.python_web/HEAD/source/_static/flask_full.png -------------------------------------------------------------------------------- /source/_static/flask_hello.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UWPCE-PythonCert/training.python_web/HEAD/source/_static/flask_hello.png -------------------------------------------------------------------------------- /source/_static/geojson-io.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UWPCE-PythonCert/training.python_web/HEAD/source/_static/geojson-io.png -------------------------------------------------------------------------------- /source/_static/heroku-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UWPCE-PythonCert/training.python_web/HEAD/source/_static/heroku-logo.png -------------------------------------------------------------------------------- /source/_static/nginx_hello.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UWPCE-PythonCert/training.python_web/HEAD/source/_static/nginx_hello.png -------------------------------------------------------------------------------- /source/_static/proxy_wsgi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UWPCE-PythonCert/training.python_web/HEAD/source/_static/proxy_wsgi.png -------------------------------------------------------------------------------- /source/_static/skateboard.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UWPCE-PythonCert/training.python_web/HEAD/source/_static/skateboard.jpg -------------------------------------------------------------------------------- /source/_static/bluebox_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UWPCE-PythonCert/training.python_web/HEAD/source/_static/bluebox_logo.png -------------------------------------------------------------------------------- /source/_static/cgitb_output.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UWPCE-PythonCert/training.python_web/HEAD/source/_static/cgitb_output.png -------------------------------------------------------------------------------- /source/_static/django-start.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UWPCE-PythonCert/training.python_web/HEAD/source/_static/django-start.png -------------------------------------------------------------------------------- /source/_static/flask_square.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UWPCE-PythonCert/training.python_web/HEAD/source/_static/flask_square.png -------------------------------------------------------------------------------- /source/_static/granny_mashup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UWPCE-PythonCert/training.python_web/HEAD/source/_static/granny_mashup.png -------------------------------------------------------------------------------- /source/_static/mod_wsgi_flow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UWPCE-PythonCert/training.python_web/HEAD/source/_static/mod_wsgi_flow.png -------------------------------------------------------------------------------- /source/_static/protocol_sea.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UWPCE-PythonCert/training.python_web/HEAD/source/_static/protocol_sea.png -------------------------------------------------------------------------------- /source/_static/pyramid-medium.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UWPCE-PythonCert/training.python_web/HEAD/source/_static/pyramid-medium.png -------------------------------------------------------------------------------- /source/_static/sheep_pyramid.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UWPCE-PythonCert/training.python_web/HEAD/source/_static/sheep_pyramid.jpg -------------------------------------------------------------------------------- /source/_static/wiki_frontpage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UWPCE-PythonCert/training.python_web/HEAD/source/_static/wiki_frontpage.png -------------------------------------------------------------------------------- /source/_static/wsgiref_flow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UWPCE-PythonCert/training.python_web/HEAD/source/_static/wsgiref_flow.png -------------------------------------------------------------------------------- /resources/session07/learning_journal/build_db: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | python setup.py develop 3 | initialize_learning_journal_db production.ini 4 | -------------------------------------------------------------------------------- /source/_static/framework_quote.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UWPCE-PythonCert/training.python_web/HEAD/source/_static/framework_quote.png -------------------------------------------------------------------------------- /source/_static/network_topology.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UWPCE-PythonCert/training.python_web/HEAD/source/_static/network_topology.png -------------------------------------------------------------------------------- /source/_static/plone_conf_2012.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UWPCE-PythonCert/training.python_web/HEAD/source/_static/plone_conf_2012.jpg -------------------------------------------------------------------------------- /source/_static/data_in_tcpip_stack.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UWPCE-PythonCert/training.python_web/HEAD/source/_static/data_in_tcpip_stack.png -------------------------------------------------------------------------------- /source/_static/django-admin-login.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UWPCE-PythonCert/training.python_web/HEAD/source/_static/django-admin-login.png -------------------------------------------------------------------------------- /source/_static/socket_interaction.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UWPCE-PythonCert/training.python_web/HEAD/source/_static/socket_interaction.png -------------------------------------------------------------------------------- /source/_static/wsgi_middleware_onion.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UWPCE-PythonCert/training.python_web/HEAD/source/_static/wsgi_middleware_onion.png -------------------------------------------------------------------------------- /resources/session02/homework/webroot/sample.txt: -------------------------------------------------------------------------------- 1 | This is a very simple text file. 2 | Just to show that we can server it up. 3 | It is three lines long. 4 | -------------------------------------------------------------------------------- /resources/session08/mysite_stage_1/myblog/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class MyblogConfig(AppConfig): 5 | name = 'myblog' 6 | -------------------------------------------------------------------------------- /resources/session08/mysite_stage_2/myblog/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class MyblogConfig(AppConfig): 5 | name = 'myblog' 6 | -------------------------------------------------------------------------------- /resources/session08/mysite_stage_3/myblog/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class MyblogConfig(AppConfig): 5 | name = 'myblog' 6 | -------------------------------------------------------------------------------- /source/_static/learning_journal_styled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UWPCE-PythonCert/training.python_web/HEAD/source/_static/learning_journal_styled.png -------------------------------------------------------------------------------- /source/_static/plone-icon-256-white-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UWPCE-PythonCert/training.python_web/HEAD/source/_static/plone-icon-256-white-bg.png -------------------------------------------------------------------------------- /source/_themes/uwpce_theme/theme.conf: -------------------------------------------------------------------------------- 1 | [theme] 2 | inherit = basic 3 | stylesheet = pyramid.css 4 | pygments_style = sphinx.pygments_styles.PyramidStyle 5 | -------------------------------------------------------------------------------- /source/_themes/uwpce_theme/static/footerbg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UWPCE-PythonCert/training.python_web/HEAD/source/_themes/uwpce_theme/static/footerbg.png -------------------------------------------------------------------------------- /source/_themes/uwpce_theme/static/headerbg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UWPCE-PythonCert/training.python_web/HEAD/source/_themes/uwpce_theme/static/headerbg.png -------------------------------------------------------------------------------- /source/_themes/uwpce_theme/static/middlebg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UWPCE-PythonCert/training.python_web/HEAD/source/_themes/uwpce_theme/static/middlebg.png -------------------------------------------------------------------------------- /source/_themes/uwpce_theme/static/dialog-note.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UWPCE-PythonCert/training.python_web/HEAD/source/_themes/uwpce_theme/static/dialog-note.png -------------------------------------------------------------------------------- /source/_themes/uwpce_theme/static/dialog-todo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UWPCE-PythonCert/training.python_web/HEAD/source/_themes/uwpce_theme/static/dialog-todo.png -------------------------------------------------------------------------------- /source/_themes/uwpce_theme/static/dialog-topic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UWPCE-PythonCert/training.python_web/HEAD/source/_themes/uwpce_theme/static/dialog-topic.png -------------------------------------------------------------------------------- /source/_themes/uwpce_theme/static/transparent.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UWPCE-PythonCert/training.python_web/HEAD/source/_themes/uwpce_theme/static/transparent.gif -------------------------------------------------------------------------------- /source/_themes/uwpce_theme/static/dialog-seealso.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UWPCE-PythonCert/training.python_web/HEAD/source/_themes/uwpce_theme/static/dialog-seealso.png -------------------------------------------------------------------------------- /source/_themes/uwpce_theme/static/dialog-warning.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UWPCE-PythonCert/training.python_web/HEAD/source/_themes/uwpce_theme/static/dialog-warning.png -------------------------------------------------------------------------------- /resources/session02/homework/webroot/images/sample_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UWPCE-PythonCert/training.python_web/HEAD/resources/session02/homework/webroot/images/sample_1.png -------------------------------------------------------------------------------- /source/_themes/uwpce_slides2/static/js/prettify/lang-go.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UWPCE-PythonCert/training.python_web/HEAD/source/_themes/uwpce_slides2/static/js/prettify/lang-go.js -------------------------------------------------------------------------------- /source/_themes/uwpce_slides2/static/js/prettify/lang-ml.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UWPCE-PythonCert/training.python_web/HEAD/source/_themes/uwpce_slides2/static/js/prettify/lang-ml.js -------------------------------------------------------------------------------- /source/_themes/uwpce_slides2/static/js/prettify/lang-vb.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UWPCE-PythonCert/training.python_web/HEAD/source/_themes/uwpce_slides2/static/js/prettify/lang-vb.js -------------------------------------------------------------------------------- /resources/session02/homework/webroot/images/JPEG_example.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UWPCE-PythonCert/training.python_web/HEAD/resources/session02/homework/webroot/images/JPEG_example.jpg -------------------------------------------------------------------------------- /source/_themes/uwpce_slides2/static/js/prettify/lang-lua.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UWPCE-PythonCert/training.python_web/HEAD/source/_themes/uwpce_slides2/static/js/prettify/lang-lua.js -------------------------------------------------------------------------------- /source/_themes/uwpce_slides2/static/js/prettify/lang-sql.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UWPCE-PythonCert/training.python_web/HEAD/source/_themes/uwpce_slides2/static/js/prettify/lang-sql.js -------------------------------------------------------------------------------- /source/_themes/uwpce_slides2/static/js/prettify/lang-tex.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UWPCE-PythonCert/training.python_web/HEAD/source/_themes/uwpce_slides2/static/js/prettify/lang-tex.js -------------------------------------------------------------------------------- /source/_themes/uwpce_slides2/static/js/prettify/lang-vhdl.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UWPCE-PythonCert/training.python_web/HEAD/source/_themes/uwpce_slides2/static/js/prettify/lang-vhdl.js -------------------------------------------------------------------------------- /source/_themes/uwpce_slides2/static/js/prettify/lang-wiki.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UWPCE-PythonCert/training.python_web/HEAD/source/_themes/uwpce_slides2/static/js/prettify/lang-wiki.js -------------------------------------------------------------------------------- /resources/session06/learning_journal/MANIFEST.in: -------------------------------------------------------------------------------- 1 | include *.txt *.ini *.cfg *.rst 2 | recursive-include learning_journal *.ico *.png *.css *.gif *.jpg *.pt *.txt *.mak *.mako *.js *.html *.xml 3 | -------------------------------------------------------------------------------- /resources/session07/learning_journal/MANIFEST.in: -------------------------------------------------------------------------------- 1 | include *.txt *.ini *.cfg *.rst 2 | recursive-include learning_journal *.ico *.png *.css *.gif *.jpg *.pt *.txt *.mak *.mako *.js *.html *.xml 3 | -------------------------------------------------------------------------------- /source/_themes/uwpce_slides2/static/js/prettify/lang-apollo.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UWPCE-PythonCert/training.python_web/HEAD/source/_themes/uwpce_slides2/static/js/prettify/lang-apollo.js -------------------------------------------------------------------------------- /source/_themes/uwpce_slides2/static/js/prettify/lang-scala.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UWPCE-PythonCert/training.python_web/HEAD/source/_themes/uwpce_slides2/static/js/prettify/lang-scala.js -------------------------------------------------------------------------------- /source/_themes/uwpce_slides2/static/scripts/md/README.md: -------------------------------------------------------------------------------- 1 | ### Want to use markdown to write your slides? 2 | 3 | `python render.py` can do that for you. 4 | 5 | Dependencies: jinja2, markdown. 6 | -------------------------------------------------------------------------------- /resources/session02/homework/webroot/images/Sample_Scene_Balls.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UWPCE-PythonCert/training.python_web/HEAD/resources/session02/homework/webroot/images/Sample_Scene_Balls.jpg -------------------------------------------------------------------------------- /resources/session06/learning_journal/learning_journal/static/pyramid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UWPCE-PythonCert/training.python_web/HEAD/resources/session06/learning_journal/learning_journal/static/pyramid.png -------------------------------------------------------------------------------- /resources/session07/learning_journal/learning_journal/static/pyramid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UWPCE-PythonCert/training.python_web/HEAD/resources/session07/learning_journal/learning_journal/static/pyramid.png -------------------------------------------------------------------------------- /resources/session06/learning_journal/learning_journal/static/pyramid-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UWPCE-PythonCert/training.python_web/HEAD/resources/session06/learning_journal/learning_journal/static/pyramid-16x16.png -------------------------------------------------------------------------------- /resources/session07/learning_journal/learning_journal/static/pyramid-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UWPCE-PythonCert/training.python_web/HEAD/resources/session07/learning_journal/learning_journal/static/pyramid-16x16.png -------------------------------------------------------------------------------- /resources/session03/cgi/cgi-bin/cgi_sums.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | import cgi 3 | import cgitb 4 | 5 | cgitb.enable() 6 | 7 | print("Content-type: text/plain") 8 | print() 9 | print("Your job is to make this work") 10 | -------------------------------------------------------------------------------- /resources/session08/mysite_stage_1/myblog/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | from myblog.models import Category 4 | from myblog.models import Post 5 | 6 | 7 | admin.site.register(Category) 8 | admin.site.register(Post) 9 | -------------------------------------------------------------------------------- /resources/session08/mysite_stage_2/myblog/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | from myblog.models import Category 4 | from myblog.models import Post 5 | 6 | 7 | admin.site.register(Category) 8 | admin.site.register(Post) 9 | -------------------------------------------------------------------------------- /resources/session08/mysite_stage_3/myblog/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | from myblog.models import Category 4 | from myblog.models import Post 5 | 6 | 7 | admin.site.register(Category) 8 | admin.site.register(Post) 9 | -------------------------------------------------------------------------------- /resources/session02/homework/webroot/a_web_page.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 |A fine place to spend a week learning web programming!
8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /source/_themes/uwpce_slides2/static/.sass-cache/17d03613c125918cd0766f51918feb21dc3c074a/_box.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UWPCE-PythonCert/training.python_web/HEAD/source/_themes/uwpce_slides2/static/.sass-cache/17d03613c125918cd0766f51918feb21dc3c074a/_box.scssc -------------------------------------------------------------------------------- /source/_themes/uwpce_slides2/static/.sass-cache/a3714e1b6bb8b987fa4c7e14e1704c7e18bb1783/_base.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UWPCE-PythonCert/training.python_web/HEAD/source/_themes/uwpce_slides2/static/.sass-cache/a3714e1b6bb8b987fa4c7e14e1704c7e18bb1783/_base.scssc -------------------------------------------------------------------------------- /source/_themes/uwpce_slides2/static/.sass-cache/a3714e1b6bb8b987fa4c7e14e1704c7e18bb1783/phone.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UWPCE-PythonCert/training.python_web/HEAD/source/_themes/uwpce_slides2/static/.sass-cache/a3714e1b6bb8b987fa4c7e14e1704c7e18bb1783/phone.scssc -------------------------------------------------------------------------------- /source/_themes/uwpce_slides2/static/.sass-cache/0fe24dfc41fffed2d6891c797fcd7dee100afa65/_hacks.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UWPCE-PythonCert/training.python_web/HEAD/source/_themes/uwpce_slides2/static/.sass-cache/0fe24dfc41fffed2d6891c797fcd7dee100afa65/_hacks.scssc -------------------------------------------------------------------------------- /source/_themes/uwpce_slides2/static/.sass-cache/17d03613c125918cd0766f51918feb21dc3c074a/_columns.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UWPCE-PythonCert/training.python_web/HEAD/source/_themes/uwpce_slides2/static/.sass-cache/17d03613c125918cd0766f51918feb21dc3c074a/_columns.scssc -------------------------------------------------------------------------------- /source/_themes/uwpce_slides2/static/.sass-cache/17d03613c125918cd0766f51918feb21dc3c074a/_images.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UWPCE-PythonCert/training.python_web/HEAD/source/_themes/uwpce_slides2/static/.sass-cache/17d03613c125918cd0766f51918feb21dc3c074a/_images.scssc -------------------------------------------------------------------------------- /source/_themes/uwpce_slides2/static/.sass-cache/a3714e1b6bb8b987fa4c7e14e1704c7e18bb1783/default.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UWPCE-PythonCert/training.python_web/HEAD/source/_themes/uwpce_slides2/static/.sass-cache/a3714e1b6bb8b987fa4c7e14e1704c7e18bb1783/default.scssc -------------------------------------------------------------------------------- /source/_themes/uwpce_slides2/static/.sass-cache/a3714e1b6bb8b987fa4c7e14e1704c7e18bb1783/io2013.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UWPCE-PythonCert/training.python_web/HEAD/source/_themes/uwpce_slides2/static/.sass-cache/a3714e1b6bb8b987fa4c7e14e1704c7e18bb1783/io2013.scssc -------------------------------------------------------------------------------- /source/_themes/uwpce_slides2/static/.sass-cache/af1a5722249b61fe97c5776f7a26e0902a00f406/_support.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UWPCE-PythonCert/training.python_web/HEAD/source/_themes/uwpce_slides2/static/.sass-cache/af1a5722249b61fe97c5776f7a26e0902a00f406/_support.scssc -------------------------------------------------------------------------------- /source/_themes/uwpce_slides2/static/.sass-cache/17d03613c125918cd0766f51918feb21dc3c074a/_transform.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UWPCE-PythonCert/training.python_web/HEAD/source/_themes/uwpce_slides2/static/.sass-cache/17d03613c125918cd0766f51918feb21dc3c074a/_transform.scssc -------------------------------------------------------------------------------- /source/_themes/uwpce_slides2/static/.sass-cache/65e4c30c131f260ea88c3e4f2e16dfc2ba547e74/_utilities.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UWPCE-PythonCert/training.python_web/HEAD/source/_themes/uwpce_slides2/static/.sass-cache/65e4c30c131f260ea88c3e4f2e16dfc2ba547e74/_utilities.scssc -------------------------------------------------------------------------------- /source/_themes/uwpce_slides2/static/.sass-cache/a3714e1b6bb8b987fa4c7e14e1704c7e18bb1783/_variables.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UWPCE-PythonCert/training.python_web/HEAD/source/_themes/uwpce_slides2/static/.sass-cache/a3714e1b6bb8b987fa4c7e14e1704c7e18bb1783/_variables.scssc -------------------------------------------------------------------------------- /source/_themes/uwpce_slides2/static/.sass-cache/a3714e1b6bb8b987fa4c7e14e1704c7e18bb1783/hieroglyph.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UWPCE-PythonCert/training.python_web/HEAD/source/_themes/uwpce_slides2/static/.sass-cache/a3714e1b6bb8b987fa4c7e14e1704c7e18bb1783/hieroglyph.scssc -------------------------------------------------------------------------------- /source/_themes/uwpce_slides2/static/.sass-cache/17d03613c125918cd0766f51918feb21dc3c074a/_box-shadow.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UWPCE-PythonCert/training.python_web/HEAD/source/_themes/uwpce_slides2/static/.sass-cache/17d03613c125918cd0766f51918feb21dc3c074a/_box-shadow.scssc -------------------------------------------------------------------------------- /source/_themes/uwpce_slides2/static/.sass-cache/17d03613c125918cd0766f51918feb21dc3c074a/_box-sizing.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UWPCE-PythonCert/training.python_web/HEAD/source/_themes/uwpce_slides2/static/.sass-cache/17d03613c125918cd0766f51918feb21dc3c074a/_box-sizing.scssc -------------------------------------------------------------------------------- /source/_themes/uwpce_slides2/static/.sass-cache/17d03613c125918cd0766f51918feb21dc3c074a/_text-shadow.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UWPCE-PythonCert/training.python_web/HEAD/source/_themes/uwpce_slides2/static/.sass-cache/17d03613c125918cd0766f51918feb21dc3c074a/_text-shadow.scssc -------------------------------------------------------------------------------- /source/_themes/uwpce_slides2/static/.sass-cache/17d03613c125918cd0766f51918feb21dc3c074a/_transition.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UWPCE-PythonCert/training.python_web/HEAD/source/_themes/uwpce_slides2/static/.sass-cache/17d03613c125918cd0766f51918feb21dc3c074a/_transition.scssc -------------------------------------------------------------------------------- /source/_themes/uwpce_slides2/static/.sass-cache/17d03613c125918cd0766f51918feb21dc3c074a/_border-radius.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UWPCE-PythonCert/training.python_web/HEAD/source/_themes/uwpce_slides2/static/.sass-cache/17d03613c125918cd0766f51918feb21dc3c074a/_border-radius.scssc -------------------------------------------------------------------------------- /source/_themes/uwpce_slides2/static/.sass-cache/17d03613c125918cd0766f51918feb21dc3c074a/_user-interface.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UWPCE-PythonCert/training.python_web/HEAD/source/_themes/uwpce_slides2/static/.sass-cache/17d03613c125918cd0766f51918feb21dc3c074a/_user-interface.scssc -------------------------------------------------------------------------------- /source/_themes/uwpce_slides2/static/.sass-cache/17d03613c125918cd0766f51918feb21dc3c074a/_background-size.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UWPCE-PythonCert/training.python_web/HEAD/source/_themes/uwpce_slides2/static/.sass-cache/17d03613c125918cd0766f51918feb21dc3c074a/_background-size.scssc -------------------------------------------------------------------------------- /source/_themes/uwpce_slides2/static/js/slide-testing.js: -------------------------------------------------------------------------------- 1 | require(['order!modernizr.custom.45394', 2 | 'order!prettify/prettify', 'order!hammer', 'order!slide-controller', 3 | 'order!slide-deck', 4 | 'order!slide-deck-instantiate'], function(someModule) { 5 | 6 | }); 7 | -------------------------------------------------------------------------------- /source/_themes/uwpce_slides2/static/.sass-cache/17d03613c125918cd0766f51918feb21dc3c074a/_deprecated-support.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UWPCE-PythonCert/training.python_web/HEAD/source/_themes/uwpce_slides2/static/.sass-cache/17d03613c125918cd0766f51918feb21dc3c074a/_deprecated-support.scssc -------------------------------------------------------------------------------- /resources/session09/mysite/mysite/templates/login.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block content %} 4 |6 | 7 |
8 |{{ entry.body }}
7 |Created {{entry.created}}
9 |%s
18 | 19 |
6 |
8 | 9 |
10 |{{ entry.body }}
7 |Created {{entry.created}}
9 |11 | Go Back :: 12 | 13 | Edit Entry 14 |
15 | {% endblock %} 16 | -------------------------------------------------------------------------------- /resources/session08/mysite_stage_1/mysite/wsgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | WSGI config for mysite project. 3 | 4 | It exposes the WSGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/1.9/howto/deployment/wsgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.wsgi import get_wsgi_application 13 | 14 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "mysite.settings") 15 | 16 | application = get_wsgi_application() 17 | -------------------------------------------------------------------------------- /resources/session08/mysite_stage_2/mysite/wsgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | WSGI config for mysite project. 3 | 4 | It exposes the WSGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/1.9/howto/deployment/wsgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.wsgi import get_wsgi_application 13 | 14 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "mysite.settings") 15 | 16 | application = get_wsgi_application() 17 | -------------------------------------------------------------------------------- /resources/session08/mysite_stage_3/mysite/wsgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | WSGI config for mysite project. 3 | 4 | It exposes the WSGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/1.9/howto/deployment/wsgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.wsgi import get_wsgi_application 13 | 14 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "mysite.settings") 15 | 16 | application = get_wsgi_application() 17 | -------------------------------------------------------------------------------- /resources/session09/mysite/myblog/templates/detail.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block content %} 4 | Home 5 |This journal is empty
14 | {% endif %} 15 | 16 | {% endblock %} 17 | -------------------------------------------------------------------------------- /source/_themes/uwpce_slides2/static/js/slide-deck-instantiate.js: -------------------------------------------------------------------------------- 1 | 2 | // Polyfill missing APIs (if we need to), then create the slide deck. 3 | // iOS < 5 needs classList, dataset, and window.matchMedia. Modernizr contains 4 | // the last one. 5 | (function() { 6 | Modernizr.load({ 7 | test: !!document.body.classList && !!document.body.dataset, 8 | nope: ['js/polyfills/classList.min.js', 'js/polyfills/dataset.min.js'], 9 | complete: function() { 10 | window.slidedeck = new SlideDeck(); 11 | } 12 | }); 13 | })(); 14 | -------------------------------------------------------------------------------- /resources/session09/mysite/mysite/urls.py: -------------------------------------------------------------------------------- 1 | from django.conf.urls import patterns, include, url 2 | from django.contrib import admin 3 | 4 | urlpatterns = patterns('', 5 | url(r'^', include('myblog.urls')), 6 | url(r'^login/$', 7 | 'django.contrib.auth.views.login', 8 | {'template_name': 'login.html'}, 9 | name="login"), 10 | url(r'^logout/$', 11 | 'django.contrib.auth.views.logout', 12 | {'next_page': '/'}, 13 | name="logout"), 14 | url(r'^admin/', include(admin.site.urls)), 15 | ) 16 | -------------------------------------------------------------------------------- /source/_templates/title_slide.html: -------------------------------------------------------------------------------- 1 |{{ entry.body|markdown }}
7 |Created {{entry.created}}
9 |11 | Go Back 12 | {% if logged_in %} 13 | :: 14 | 15 | Edit Entry 16 | {% endif %} 17 |
18 | {% endblock %} 19 | -------------------------------------------------------------------------------- /source/_themes/uwpce_slides2/static/js/prettify/lang-hs.js: -------------------------------------------------------------------------------- 1 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t-\r ]+/,null,"\t\n\r "],["str",/^"(?:[^\n\f\r"\\]|\\[\S\s])*(?:"|$)/,null,'"'],["str",/^'(?:[^\n\f\r'\\]|\\[^&])'?/,null,"'"],["lit",/^(?:0o[0-7]+|0x[\da-f]+|\d+(?:\.\d+)?(?:e[+-]?\d+)?)/i,null,"0123456789"]],[["com",/^(?:--+[^\n\f\r]*|{-(?:[^-]|-+[^}-])*-})/],["kwd",/^(?:case|class|data|default|deriving|do|else|if|import|in|infix|infixl|infixr|instance|let|module|newtype|of|then|type|where|_)(?=[^\d'A-Za-z]|$)/, 2 | null],["pln",/^(?:[A-Z][\w']*\.)*[A-Za-z][\w']*/],["pun",/^[^\d\t-\r "'A-Za-z]+/]]),["hs"]); 3 | -------------------------------------------------------------------------------- /resources/session07/forms.py: -------------------------------------------------------------------------------- 1 | from wtforms import ( 2 | Form, 3 | HiddenField, 4 | TextField, 5 | TextAreaField, 6 | validators, 7 | ) 8 | 9 | strip_filter = lambda x: x.strip() if x else None 10 | 11 | 12 | class EntryCreateForm(Form): 13 | title = TextField( 14 | 'Entry title', 15 | [validators.Length(min=1, max=255)], 16 | filters=[strip_filter] 17 | ) 18 | body = TextAreaField( 19 | 'Entry body', 20 | [validators.Length(min=1)], 21 | filters=[strip_filter] 22 | ) 23 | 24 | 25 | class EntryEditForm(EntryCreateForm): 26 | id = HiddenField() 27 | -------------------------------------------------------------------------------- /source/_themes/uwpce_slides2/slide.html: -------------------------------------------------------------------------------- 1 |Hey there, this page has been generated by {software}, running {script}
21 |Today is {month} {date}, {year}.
22 |This page was requested by IP Address {client_ip}
23 | 24 | """.format( 25 | software=os.environ.get('SERVER_SOFTWARE', default), 26 | script='aaaa', 27 | month='bbbb', 28 | date='cccc', 29 | year='dddd', 30 | client_ip='eeee' 31 | ) 32 | print(body) 33 | -------------------------------------------------------------------------------- /resources/session07/learning_journal/requirements.txt: -------------------------------------------------------------------------------- 1 | appnope==0.1.0 2 | decorator==4.0.6 3 | ipython==4.0.1 4 | ipython-genutils==0.1.0 5 | Jinja2==2.8 6 | Mako==1.0.3 7 | Markdown==2.6.5 8 | MarkupSafe==0.23 9 | passlib==1.6.5 10 | PasteDeploy==1.5.2 11 | path.py==8.1.2 12 | pexpect==4.0.1 13 | pickleshare==0.5 14 | psycopg2==2.6.1 15 | ptyprocess==0.5 16 | Pygments==2.0.2 17 | pyramid==1.5.7 18 | pyramid-debugtoolbar==2.4.2 19 | pyramid-jinja2==2.5 20 | pyramid-mako==1.0.2 21 | pyramid-tm==0.12.1 22 | repoze.lru==0.6 23 | simplegeneric==0.8.1 24 | SQLAlchemy==1.0.11 25 | traitlets==4.0.0 26 | transaction==1.4.4 27 | translationstring==1.3 28 | venusian==1.0 29 | waitress==0.8.10 30 | WebOb==1.5.1 31 | WTForms==2.1 32 | zope.deprecation==4.1.2 33 | zope.interface==4.1.3 34 | zope.sqlalchemy==0.7.6 35 | -------------------------------------------------------------------------------- /source/_themes/uwpce_slides2/static/js/prettify/lang-lisp.js: -------------------------------------------------------------------------------- 1 | var a=null; 2 | PR.registerLangHandler(PR.createSimpleLexer([["opn",/^\(+/,a,"("],["clo",/^\)+/,a,")"],["com",/^;[^\n\r]*/,a,";"],["pln",/^[\t\n\r \xa0]+/,a,"\t\n\r \xa0"],["str",/^"(?:[^"\\]|\\[\S\s])*(?:"|$)/,a,'"']],[["kwd",/^(?:block|c[ad]+r|catch|con[ds]|def(?:ine|un)|do|eq|eql|equal|equalp|eval-when|flet|format|go|if|labels|lambda|let|load-time-value|locally|macrolet|multiple-value-call|nil|progn|progv|quote|require|return-from|setq|symbol-macrolet|t|tagbody|the|throw|unwind)\b/,a], 3 | ["lit",/^[+-]?(?:[#0]x[\da-f]+|\d+\/\d+|(?:\.\d+|\d+(?:\.\d*)?)(?:[de][+-]?\d+)?)/i],["lit",/^'(?:-*(?:\w|\\[!-~])(?:[\w-]*|\\[!-~])[!=?]?)?/],["pln",/^-*(?:[_a-z]|\\[!-~])(?:[\w-]*|\\[!-~])[!=?]?/i],["pun",/^[^\w\t\n\r "'-);\\\xa0]+/]]),["cl","el","lisp","scm"]); 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .svn 2 | .DS_Store 3 | *.pyc 4 | *.pyo 5 | *.egg-info 6 | *.egg 7 | *.pt.cache 8 | .Python 9 | *.mo 10 | *.o 11 | *.lo 12 | *.la 13 | .*.rej 14 | *.rej 15 | .*~ 16 | *~ 17 | #*# 18 | .#* 19 | .~lock.*# 20 | .VimballRecord 21 | .netrwhist 22 | tags 23 | tags-* 24 | en.utf-8.add.spl 25 | svn-commit.tmp 26 | .AppleDouble 27 | .vim/bundle/command-t/ruby/command-t/Makefile 28 | .vim/bundle/command-t/ruby/command-t/ext.bundle 29 | .vim/bundle/command-t/ruby/command-t/mkmf.log 30 | .installed.cfg 31 | bin 32 | build 33 | include 34 | lib 35 | share 36 | cast-offs 37 | develop-eggs 38 | development 39 | *.db 40 | *.sublime-project 41 | *.sublime-workspace 42 | .mr.developer.cfg 43 | outline_improvements.txt 44 | src 45 | html 46 | slides 47 | new_mash 48 | .buildinfo 49 | pip-selfcheck.json 50 | .ipynb_checkpoints 51 | testenvs 52 | -------------------------------------------------------------------------------- /resources/session08/mysite_stage_1/myblog/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | from django.contrib.auth.models import User 3 | 4 | from myblog.models import Category 5 | from myblog.models import Post 6 | 7 | 8 | class PostTestCase(TestCase): 9 | fixtures = ['myblog_test_fixture.json'] 10 | 11 | def setUp(self): 12 | self.user = User.objects.get(pk=1) 13 | 14 | def test_string_representation(self): 15 | expected = "This is a title" 16 | p1 = Post(title=expected) 17 | actual = str(p1) 18 | self.assertEqual(expected, actual) 19 | 20 | 21 | class CategoryTestCase(TestCase): 22 | 23 | def test_string_representation(self): 24 | expected = "A Category" 25 | c1 = Category(name=expected) 26 | actual = str(c1) 27 | self.assertEqual(expected, actual) 28 | -------------------------------------------------------------------------------- /resources/session06/layout.jinja2: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |This journal is empty
27 | {% endif %} 28 | {% if not login_form %} 29 | 30 | {% endif %} 31 | {% endblock %} 32 | -------------------------------------------------------------------------------- /source/_themes/uwpce_slides2/static/theme/scss/io2013.scss: -------------------------------------------------------------------------------- 1 | @import "compass/css3/background-size"; 2 | 3 | @import "variables"; 4 | 5 | * { 6 | line-height: 1.3; 7 | } 8 | 9 | h2 { 10 | font-weight: bold; 11 | } 12 | h2, h3 { 13 | color: $gray-4; 14 | } 15 | 16 | q, blockquote { 17 | font-weight: bold; 18 | } 19 | 20 | slides > slide { 21 | color: $gray-4; 22 | 23 | &.title-slide { 24 | &:after { 25 | content: ''; 26 | background: url(../../images/io2013/google-io-lockup-1.png) no-repeat 100% 50%; 27 | @include background-size(contain); 28 | position: absolute; 29 | bottom: $slide-top-bottom-padding + 40; 30 | right: $slide-top-bottom-padding; 31 | width: 100%; 32 | height: 90px; 33 | } 34 | 35 | hgroup { 36 | h1 { 37 | font-weight: bold; 38 | line-height: 1.1; 39 | } 40 | h2, p { 41 | color: $gray-4; 42 | } 43 | h2 { 44 | margin-top: 0.25em; 45 | } 46 | p { 47 | margin-top: 3em; 48 | } 49 | } 50 | } 51 | } -------------------------------------------------------------------------------- /source/_themes/uwpce_slides2/static/.sass-cache/af1a5722249b61fe97c5776f7a26e0902a00f406/_reset.scssc: -------------------------------------------------------------------------------- 1 | 3.4.13 (Selective Steve) 2 | df78759f0fe6b88a633d20d26581ca4cdb829111 3 | o:Sass::Tree::RootNode:@children[o:Sass::Tree::ImportNode:@imported_filenameI"reset/utilities:ET;[ :@template0: 4 | @linei:@source_rangeo:Sass::Source::Range :@start_poso:Sass::Source::Position;i:@offseti: @end_poso;;i;i: 5 | @fileI"U/Library/Ruby/Gems/2.0.0/gems/compass-core-1.0.3/stylesheets/compass/_reset.scss; T:@importero: Sass::Importers::Filesystem: 6 | @rootI"A/Library/Ruby/Gems/2.0.0/gems/compass-core-1.0.3/stylesheets; F:@real_rootI"A/Library/Ruby/Gems/2.0.0/gems/compass-core-1.0.3/stylesheets; F:@same_name_warningso:Set: 7 | @hash{ : @options{ :@imported_file0o:Sass::Tree::MixinNode: 8 | @nameI"global-reset; T: 9 | @args[ :@keywords{ :@splat0:@kwarg_splat0;[ ;i;o; ;o;;i;i;o;;i;i;@ ;@;@; 10 | I"8@import "reset/utilities"; 11 | 12 | @include global-reset; 13 | ; T;i;o; ;o;;i;i;o;;i;i;@ ;@:@has_childrenT;@ -------------------------------------------------------------------------------- /resources/session06/learning_journal/learning_journal/__init__.py: -------------------------------------------------------------------------------- 1 | from pyramid.config import Configurator 2 | from sqlalchemy import engine_from_config 3 | 4 | from .models import ( 5 | DBSession, 6 | Base, 7 | ) 8 | 9 | 10 | def create_session(settings): 11 | from sqlalchemy.orm import sessionmaker 12 | engine = engine_from_config(settings, 'sqlalchemy.') 13 | Session = sessionmaker(bind=engine) 14 | return Session() 15 | 16 | 17 | def main(global_config, **settings): 18 | """ This function returns a Pyramid WSGI application. 19 | """ 20 | engine = engine_from_config(settings, 'sqlalchemy.') 21 | DBSession.configure(bind=engine) 22 | Base.metadata.bind = engine 23 | config = Configurator(settings=settings) 24 | config.include('pyramid_jinja2') 25 | config.add_static_view('static', 'static', cache_max_age=3600) 26 | config.add_route('home', '/') 27 | config.add_route('detail', '/journal/{id:\d+}') 28 | config.add_route('action', '/journal/{action}') 29 | config.scan() 30 | return config.make_wsgi_app() 31 | -------------------------------------------------------------------------------- /resources/session06/learning_journal/learning_journal/scripts/initializedb.py: -------------------------------------------------------------------------------- 1 | import os 2 | import sys 3 | import transaction 4 | 5 | from sqlalchemy import engine_from_config 6 | 7 | from pyramid.paster import ( 8 | get_appsettings, 9 | setup_logging, 10 | ) 11 | 12 | from pyramid.scripts.common import parse_vars 13 | 14 | from ..models import ( 15 | DBSession, 16 | MyModel, 17 | Base, 18 | ) 19 | 20 | 21 | def usage(argv): 22 | cmd = os.path.basename(argv[0]) 23 | print('usage: %sHey there, this page has been generated by {software}, running at {path}
12 |Today is {month} {date}, {year}.
13 |This page was requested by IP Address {client_ip}
14 | 15 | """ 16 | 17 | 18 | def application(environ, start_response): 19 | import pprint 20 | pprint.pprint(environ) 21 | 22 | response_body = body.format( 23 | software=environ.get('SERVER_SOFTWARE', default), 24 | path="aaaa", 25 | month="bbbb", 26 | date="cccc", 27 | year="dddd", 28 | client_ip="eeee" 29 | ) 30 | status = '200 OK' 31 | 32 | response_headers = [('Content-Type', 'text/html'), 33 | ('Content-Length', str(len(response_body)))] 34 | start_response(status, response_headers) 35 | 36 | return [response_body.encode('utf8')] 37 | 38 | 39 | if __name__ == '__main__': 40 | from wsgiref.simple_server import make_server 41 | srv = make_server('localhost', 8080, application) 42 | srv.serve_forever() 43 | -------------------------------------------------------------------------------- /resources/session02/simple_client.py: -------------------------------------------------------------------------------- 1 | import socket 2 | import sys 3 | 4 | 5 | def client(msg): 6 | server_address = ('localhost', 10000) 7 | sock = socket.socket( 8 | socket.AF_INET, socket.SOCK_STREAM, socket.IPPROTO_TCP 9 | ) 10 | print( 11 | 'connecting to {0} port {1}'.format(*server_address), 12 | file=sys.stderr 13 | ) 14 | sock.connect(server_address) 15 | response = '' 16 | done = False 17 | bufsize = 1024 18 | try: 19 | print('sending "{0}"'.format(msg), file=sys.stderr) 20 | sock.sendall(msg.encode('utf8')) 21 | while not done: 22 | chunk = sock.recv(bufsize) 23 | if len(chunk) < bufsize: 24 | done = True 25 | response += chunk.decode('utf8') 26 | print('received "{0}"'.format(response), file=sys.stderr) 27 | finally: 28 | print('closing socket', file=sys.stderr) 29 | sock.close() 30 | return response 31 | 32 | 33 | if __name__ == '__main__': 34 | if len(sys.argv) != 2: 35 | usg = '\nusage: python echo_client.py "this is my message"\n' 36 | print(usg, file=sys.stderr) 37 | sys.exit(1) 38 | 39 | msg = sys.argv[1] 40 | client(msg) 41 | -------------------------------------------------------------------------------- /resources/session08/mysite_stage_1/myblog/migrations/0001_initial.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.9 on 2015-12-31 19:13 3 | from __future__ import unicode_literals 4 | 5 | from django.conf import settings 6 | from django.db import migrations, models 7 | import django.db.models.deletion 8 | 9 | 10 | class Migration(migrations.Migration): 11 | 12 | initial = True 13 | 14 | dependencies = [ 15 | migrations.swappable_dependency(settings.AUTH_USER_MODEL), 16 | ] 17 | 18 | operations = [ 19 | migrations.CreateModel( 20 | name='Post', 21 | fields=[ 22 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 23 | ('title', models.CharField(max_length=128)), 24 | ('text', models.TextField(blank=True)), 25 | ('created_date', models.DateTimeField(auto_now_add=True)), 26 | ('modified_date', models.DateTimeField(auto_now=True)), 27 | ('published_date', models.DateTimeField(blank=True, null=True)), 28 | ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), 29 | ], 30 | ), 31 | ] 32 | -------------------------------------------------------------------------------- /resources/session08/mysite_stage_2/myblog/migrations/0001_initial.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.9 on 2015-12-31 19:13 3 | from __future__ import unicode_literals 4 | 5 | from django.conf import settings 6 | from django.db import migrations, models 7 | import django.db.models.deletion 8 | 9 | 10 | class Migration(migrations.Migration): 11 | 12 | initial = True 13 | 14 | dependencies = [ 15 | migrations.swappable_dependency(settings.AUTH_USER_MODEL), 16 | ] 17 | 18 | operations = [ 19 | migrations.CreateModel( 20 | name='Post', 21 | fields=[ 22 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 23 | ('title', models.CharField(max_length=128)), 24 | ('text', models.TextField(blank=True)), 25 | ('created_date', models.DateTimeField(auto_now_add=True)), 26 | ('modified_date', models.DateTimeField(auto_now=True)), 27 | ('published_date', models.DateTimeField(blank=True, null=True)), 28 | ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), 29 | ], 30 | ), 31 | ] 32 | -------------------------------------------------------------------------------- /resources/session08/mysite_stage_3/myblog/migrations/0001_initial.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.9 on 2015-12-31 19:13 3 | from __future__ import unicode_literals 4 | 5 | from django.conf import settings 6 | from django.db import migrations, models 7 | import django.db.models.deletion 8 | 9 | 10 | class Migration(migrations.Migration): 11 | 12 | initial = True 13 | 14 | dependencies = [ 15 | migrations.swappable_dependency(settings.AUTH_USER_MODEL), 16 | ] 17 | 18 | operations = [ 19 | migrations.CreateModel( 20 | name='Post', 21 | fields=[ 22 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 23 | ('title', models.CharField(max_length=128)), 24 | ('text', models.TextField(blank=True)), 25 | ('created_date', models.DateTimeField(auto_now_add=True)), 26 | ('modified_date', models.DateTimeField(auto_now=True)), 27 | ('published_date', models.DateTimeField(blank=True, null=True)), 28 | ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), 29 | ], 30 | ), 31 | ] 32 | -------------------------------------------------------------------------------- /resources/session08/mysite_stage_3/mysite/urls.py: -------------------------------------------------------------------------------- 1 | """mysite URL Configuration 2 | 3 | The `urlpatterns` list routes URLs to views. For more information please see: 4 | https://docs.djangoproject.com/en/1.9/topics/http/urls/ 5 | Examples: 6 | Function views 7 | 1. Add an import: from my_app import views 8 | 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') 9 | Class-based views 10 | 1. Add an import: from other_app.views import Home 11 | 2. Add a URL to urlpatterns: url(r'^$', Home.as_view(), name='home') 12 | Including another URLconf 13 | 1. Add an import: from blog import urls as blog_urls 14 | 2. Import the include() function: from django.conf.urls import url, include 15 | 3. Add a URL to urlpatterns: url(r'^blog/', include(blog_urls)) 16 | """ 17 | from django.conf.urls import url 18 | from django.conf.urls import include 19 | from django.contrib import admin 20 | from django.contrib.auth.views import login, logout 21 | 22 | urlpatterns = [ 23 | url(r'^', include('myblog.urls')), 24 | url(r'^login/$', 25 | login, 26 | {'template_name': 'login.html'}, 27 | name="login"), 28 | url(r'^logout/$', 29 | logout, 30 | {'next_page': '/'}, 31 | name="logout"), 32 | url(r'^admin/', admin.site.urls), 33 | ] 34 | -------------------------------------------------------------------------------- /source/_themes/uwpce_slides2/static/slide_config.js_t: -------------------------------------------------------------------------------- 1 | var SLIDE_CONFIG = { 2 | // Slide settings 3 | settings: { 4 | title: '{{ docstitle|e }}', 5 | subtitle: '{{ theme_subtitle|e }}', 6 | //eventInfo: { 7 | // title: 'Google I/O', 8 | // date: '6/x/2013' 9 | //}, 10 | useBuilds: {{ theme_use_builds }}, // Default: true. False will turn off slide animation builds. 11 | usePrettify: {{ theme_use_prettify }}, // Default: true 12 | enableSlideAreas: {{ theme_enable_slide_areas }}, // Default: true. False turns off the click areas on either slide of the slides. 13 | enableTouch: {{ theme_enable_touch }}, // Default: true. If touch support should enabled. Note: the device must support touch. 14 | //analytics: 'UA-XXXXXXXX-1', // TODO: Using this breaks GA for some reason (probably requirejs). Update your tracking code in template.html instead. 15 | favIcon: {{ theme_favicon }}, 16 | fonts: [ 17 | 'Open Sans:regular,semibold,italic,italicsemibold', 18 | 'Source Code Pro' 19 | ], 20 | //theme: ['mytheme'], // Add your own custom themes or styles in /theme/css. Leave off the .css extension. 21 | }, 22 | 23 | // Author information 24 | presenters: {% if theme_presenters %}{{ theme_presenters|json }} 25 | {% else %}[] 26 | {% endif %} 27 | }; 28 | -------------------------------------------------------------------------------- /resources/session02/homework/simple_client.py: -------------------------------------------------------------------------------- 1 | import socket 2 | import sys 3 | 4 | 5 | def bytes_client(msg): 6 | server_address = ('localhost', 10000) 7 | sock = socket.socket( 8 | socket.AF_INET, socket.SOCK_STREAM, socket.IPPROTO_TCP 9 | ) 10 | print( 11 | 'connecting to {0} port {1}'.format(*server_address), 12 | file=sys.stderr 13 | ) 14 | sock.connect(server_address) 15 | response = b'' 16 | done = False 17 | bufsize = 1024 18 | try: 19 | print('sending "{0}"'.format(msg), file=sys.stderr) 20 | sock.sendall(msg.encode('utf8')) 21 | while not done: 22 | chunk = sock.recv(bufsize) 23 | if len(chunk) < bufsize: 24 | done = True 25 | response += chunk 26 | print('received "{0}"'.format(response), file=sys.stderr) 27 | finally: 28 | print('closing socket', file=sys.stderr) 29 | sock.close() 30 | return response 31 | 32 | 33 | def client(msg): 34 | return bytes_client(msg).decode('utf8') 35 | 36 | 37 | if __name__ == '__main__': 38 | if len(sys.argv) != 2: 39 | usg = '\nusage: python echo_client.py "this is my message"\n' 40 | print(usg, file=sys.stderr) 41 | sys.exit(1) 42 | 43 | msg = sys.argv[1] 44 | client(msg) 45 | -------------------------------------------------------------------------------- /resources/session02/http_server.py: -------------------------------------------------------------------------------- 1 | import socket 2 | import sys 3 | 4 | 5 | def server(log_buffer=sys.stderr): 6 | address = ('127.0.0.1', 10000) 7 | sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) 8 | sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) 9 | print("making a server on {0}:{1}".format(*address), file=log_buffer) 10 | sock.bind(address) 11 | sock.listen(1) 12 | 13 | try: 14 | while True: 15 | print('waiting for a connection', file=log_buffer) 16 | conn, addr = sock.accept() # blocking 17 | try: 18 | print('connection - {0}:{1}'.format(*addr), file=log_buffer) 19 | while True: 20 | data = conn.recv(16) 21 | print('received "{0}"'.format(data), file=log_buffer) 22 | if data: 23 | print('sending data back to client', file=log_buffer) 24 | conn.sendall(data) 25 | else: 26 | msg = 'no more data from {0}:{1}'.format(*addr) 27 | print(msg, log_buffer) 28 | break 29 | finally: 30 | conn.close() 31 | 32 | except KeyboardInterrupt: 33 | sock.close() 34 | return 35 | 36 | 37 | if __name__ == '__main__': 38 | server() 39 | sys.exit(0) 40 | -------------------------------------------------------------------------------- /resources/session06/learning_journal/learning_journal/views.py: -------------------------------------------------------------------------------- 1 | from pyramid.httpexceptions import HTTPFound, HTTPNotFound 2 | from pyramid.view import view_config 3 | 4 | from .models import ( 5 | DBSession, 6 | MyModel, 7 | Entry, 8 | ) 9 | 10 | from .forms import EntryCreateForm 11 | 12 | 13 | @view_config(route_name='home', renderer='templates/list.jinja2') 14 | def index_page(request): 15 | entries = Entry.all() 16 | return {'entries': entries} 17 | 18 | 19 | @view_config(route_name='detail', renderer='templates/detail.jinja2') 20 | def view(request): 21 | this_id = request.matchdict.get('id', -1) 22 | entry = Entry.by_id(this_id) 23 | if not entry: 24 | return HTTPNotFound() 25 | return {'entry': entry} 26 | 27 | 28 | @view_config(route_name='action', match_param='action=create', 29 | renderer='templates/edit.jinja2') 30 | def create(request): 31 | entry = Entry() 32 | form = EntryCreateForm(request.POST) 33 | if request.method == 'POST' and form.validate(): 34 | form.populate_obj(entry) 35 | DBSession.add(entry) 36 | return HTTPFound(location=request.route_url('home')) 37 | return {'form': form, 'action': request.matchdict.get('action')} 38 | 39 | 40 | @view_config(route_name='action', match_param='action=edit', 41 | renderer='string') 42 | def update(request): 43 | return 'edit page' 44 | -------------------------------------------------------------------------------- /resources/session07/learning_journal/learning_journal/scripts/initializedb.py: -------------------------------------------------------------------------------- 1 | import os 2 | import sys 3 | import transaction 4 | 5 | from sqlalchemy import engine_from_config 6 | 7 | from pyramid.paster import ( 8 | get_appsettings, 9 | setup_logging, 10 | ) 11 | 12 | from pyramid.scripts.common import parse_vars 13 | 14 | from ..models import ( 15 | DBSession, 16 | MyModel, 17 | Base, 18 | User, 19 | password_context 20 | ) 21 | 22 | 23 | def usage(argv): 24 | cmd = os.path.basename(argv[0]) 25 | print('usage: %s
46 | @media screen and (max-width: 640px) {
47 | #sidebar { display: none; }
48 | }
49 |
50 |
51 | ---
52 |
53 | title: Once more, with JavaScript
54 |
55 |
56 | function isSmall() {
57 | return window.matchMedia("(min-device-width: ???)").matches;
58 | }
59 |
60 | function hasTouch() {
61 | return Modernizr.touch;
62 | }
63 |
64 | function detectFormFactor() {
65 | var device = DESKTOP;
66 | if (hasTouch()) {
67 | device = isSmall() ? PHONE : TABLET;
68 | }
69 | return device;
70 | }
71 |
72 |
73 | ---
74 |
75 | title: Centered content
76 | content_class: flexbox vcenter
77 |
78 | This content should be centered!
79 |
--------------------------------------------------------------------------------
/source/_themes/uwpce_slides2/static/js/prettify/lang-clj.js:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2011 Google Inc.
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | */
16 | var a=null;
17 | PR.registerLangHandler(PR.createSimpleLexer([["opn",/^[([{]+/,a,"([{"],["clo",/^[)\]}]+/,a,")]}"],["com",/^;[^\n\r]*/,a,";"],["pln",/^[\t\n\r \xa0]+/,a,"\t\n\r \xa0"],["str",/^"(?:[^"\\]|\\[\S\s])*(?:"|$)/,a,'"']],[["kwd",/^(?:def|if|do|let|quote|var|fn|loop|recur|throw|try|monitor-enter|monitor-exit|defmacro|defn|defn-|macroexpand|macroexpand-1|for|doseq|dosync|dotimes|and|or|when|not|assert|doto|proxy|defstruct|first|rest|cons|defprotocol|deftype|defrecord|reify|defmulti|defmethod|meta|with-meta|ns|in-ns|create-ns|import|intern|refer|alias|namespace|resolve|ref|deref|refset|new|set!|memfn|to-array|into-array|aset|gen-class|reduce|map|filter|find|nil?|empty?|hash-map|hash-set|vec|vector|seq|flatten|reverse|assoc|dissoc|list|list?|disj|get|union|difference|intersection|extend|extend-type|extend-protocol|prn)\b/,a],
18 | ["typ",/^:[\dA-Za-z-]+/]]),["clj"]);
19 |
--------------------------------------------------------------------------------
/resources/session07/learning_journal/setup.py:
--------------------------------------------------------------------------------
1 | import os
2 |
3 | from setuptools import setup, find_packages
4 |
5 | here = os.path.abspath(os.path.dirname(__file__))
6 | with open(os.path.join(here, 'README.txt')) as f:
7 | README = f.read()
8 | with open(os.path.join(here, 'CHANGES.txt')) as f:
9 | CHANGES = f.read()
10 |
11 | requires = [
12 | 'pyramid',
13 | 'pyramid_jinja2',
14 | 'pyramid_debugtoolbar',
15 | 'pyramid_tm',
16 | 'SQLAlchemy',
17 | 'transaction',
18 | 'zope.sqlalchemy',
19 | 'waitress',
20 | 'wtforms',
21 | 'passlib',
22 | 'markdown',
23 | 'pygments',
24 | ]
25 |
26 | setup(name='learning_journal',
27 | version='0.0',
28 | description='learning_journal',
29 | long_description=README + '\n\n' + CHANGES,
30 | classifiers=[
31 | "Programming Language :: Python",
32 | "Framework :: Pyramid",
33 | "Topic :: Internet :: WWW/HTTP",
34 | "Topic :: Internet :: WWW/HTTP :: WSGI :: Application",
35 | ],
36 | author='',
37 | author_email='',
38 | url='',
39 | keywords='web wsgi bfg pylons pyramid',
40 | packages=find_packages(),
41 | include_package_data=True,
42 | zip_safe=False,
43 | test_suite='learning_journal',
44 | install_requires=requires,
45 | entry_points="""\
46 | [paste.app_factory]
47 | main = learning_journal:main
48 | [console_scripts]
49 | initialize_learning_journal_db = learning_journal.scripts.initializedb:main
50 | """,
51 | )
52 |
--------------------------------------------------------------------------------
/resources/session06/learning_journal/production.ini:
--------------------------------------------------------------------------------
1 | ###
2 | # app configuration
3 | # http://docs.pylonsproject.org/projects/pyramid/en/1.5-branch/narr/environment.html
4 | ###
5 |
6 | [app:main]
7 | use = egg:learning_journal
8 |
9 | pyramid.reload_templates = false
10 | pyramid.debug_authorization = false
11 | pyramid.debug_notfound = false
12 | pyramid.debug_routematch = false
13 | pyramid.default_locale_name = en
14 | pyramid.includes =
15 | pyramid_tm
16 |
17 | sqlalchemy.url = sqlite:///%(here)s/learning_journal.sqlite
18 |
19 | [server:main]
20 | use = egg:waitress#main
21 | host = 0.0.0.0
22 | port = 6543
23 |
24 | ###
25 | # logging configuration
26 | # http://docs.pylonsproject.org/projects/pyramid/en/1.5-branch/narr/logging.html
27 | ###
28 |
29 | [loggers]
30 | keys = root, learning_journal, sqlalchemy
31 |
32 | [handlers]
33 | keys = console
34 |
35 | [formatters]
36 | keys = generic
37 |
38 | [logger_root]
39 | level = WARN
40 | handlers = console
41 |
42 | [logger_learning_journal]
43 | level = WARN
44 | handlers =
45 | qualname = learning_journal
46 |
47 | [logger_sqlalchemy]
48 | level = WARN
49 | handlers =
50 | qualname = sqlalchemy.engine
51 | # "level = INFO" logs SQL queries.
52 | # "level = DEBUG" logs SQL queries and results.
53 | # "level = WARN" logs neither. (Recommended for production systems.)
54 |
55 | [handler_console]
56 | class = StreamHandler
57 | args = (sys.stderr,)
58 | level = NOTSET
59 | formatter = generic
60 |
61 | [formatter_generic]
62 | format = %(asctime)s %(levelname)-5.5s [%(name)s][%(threadName)s] %(message)s
63 |
--------------------------------------------------------------------------------
/resources/session01/tests.py:
--------------------------------------------------------------------------------
1 | from echo_client import client
2 | import socket
3 | import unittest
4 |
5 |
6 | class EchoTestCase(unittest.TestCase):
7 | """tests for the echo server and client"""
8 |
9 | def send_message(self, message):
10 | """Attempt to send a message using the client
11 |
12 | In case of a socket error, fail and report the problem
13 | """
14 | try:
15 | reply = client(message)
16 | except socket.error as e:
17 | if e.errno == 61:
18 | msg = "Error: {0}, is the server running?"
19 | self.fail(msg.format(e.strerror))
20 | else:
21 | self.fail("Unexpected Error: {0}".format(str(e)))
22 | return reply
23 |
24 | def test_short_message_echo(self):
25 | """test that a message short than 16 bytes echoes cleanly"""
26 | expected = "short message"
27 | actual = self.send_message(expected)
28 | self.assertEqual(
29 | expected,
30 | actual,
31 | "expected {0}, got {1}".format(expected, actual)
32 | )
33 |
34 | def test_long_message_echo(self):
35 | """test that a message longer than 16 bytes echoes in 16-byte chunks"""
36 | expected = "Four score and seven years ago our fathers did stuff"
37 | actual = self.send_message(expected)
38 | self.assertEqual(
39 | expected,
40 | actual,
41 | "expected {0}, got {1}".format(expected, actual)
42 | )
43 |
44 |
45 | if __name__ == '__main__':
46 | unittest.main()
47 |
--------------------------------------------------------------------------------
/resources/session07/learning_journal/production.ini:
--------------------------------------------------------------------------------
1 | ###
2 | # app configuration
3 | # http://docs.pylonsproject.org/projects/pyramid/en/1.5-branch/narr/environment.html
4 | ###
5 |
6 | [app:main]
7 | use = egg:learning_journal
8 |
9 |
10 | pyramid.reload_templates = false
11 | pyramid.debug_authorization = false
12 | pyramid.debug_notfound = false
13 | pyramid.debug_routematch = false
14 | pyramid.default_locale_name = en
15 | pyramid.includes =
16 | pyramid_tm
17 |
18 | sqlalchemy.url = sqlite:///%(here)s/learning_journal.sqlite
19 |
20 | jinja2.filters =
21 | markdown = learning_journal.views.render_markdown
22 |
23 | [server:main]
24 | use = egg:waitress#main
25 | host = 0.0.0.0
26 | port = 6543
27 |
28 | ###
29 | # logging configuration
30 | # http://docs.pylonsproject.org/projects/pyramid/en/1.5-branch/narr/logging.html
31 | ###
32 |
33 | [loggers]
34 | keys = root, learning_journal, sqlalchemy
35 |
36 | [handlers]
37 | keys = console
38 |
39 | [formatters]
40 | keys = generic
41 |
42 | [logger_root]
43 | level = WARN
44 | handlers = console
45 |
46 | [logger_learning_journal]
47 | level = WARN
48 | handlers =
49 | qualname = learning_journal
50 |
51 | [logger_sqlalchemy]
52 | level = WARN
53 | handlers =
54 | qualname = sqlalchemy.engine
55 | # "level = INFO" logs SQL queries.
56 | # "level = DEBUG" logs SQL queries and results.
57 | # "level = WARN" logs neither. (Recommended for production systems.)
58 |
59 | [handler_console]
60 | class = StreamHandler
61 | args = (sys.stderr,)
62 | level = NOTSET
63 | formatter = generic
64 |
65 | [formatter_generic]
66 | format = %(asctime)s %(levelname)-5.5s [%(name)s][%(threadName)s] %(message)s
67 |
--------------------------------------------------------------------------------
/resources/session08/django_blog.css:
--------------------------------------------------------------------------------
1 | body {
2 | background-color: #eee;
3 | color: #111;
4 | font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
5 | margin:0;
6 | padding:0;
7 | }
8 | #container {
9 | margin:0;
10 | padding:0;
11 | margin-top: 0px;
12 | }
13 | #header {
14 | background-color: #333;
15 | border-botton: 1px solid #111;
16 | margin:0;
17 | padding:0;
18 | }
19 | #control-bar {
20 | margin: 0em 0em 1em;
21 | list-style: none;
22 | list-style-type: none;
23 | text-align: right;
24 | color: #eee;
25 | font-size: 80%;
26 | padding-bottom: 0.4em;
27 | }
28 | #control-bar li {
29 | display: inline-block;
30 | }
31 | #control-bar li a {
32 | color: #eee;
33 | padding: 0.5em;
34 | text-decoration: none;
35 | }
36 | #control-bar li a:hover {
37 | color: #cce;
38 | }
39 | #content {
40 | margin: 0em 1em 1em;
41 | }
42 |
43 | ul#entries {
44 | list-style: none;
45 | list-style-type: none;
46 | }
47 | div.entry {
48 | margin-right: 2em;
49 | margin-top: 1em;
50 | border-top: 1px solid #cecece;
51 | }
52 | ul#entries li:first-child div.entry {
53 | border-top: none;
54 | margin-top: 0em;
55 | }
56 | div.entry-body {
57 | margin-left: 2em;
58 | }
59 | .notification {
60 | float: right;
61 | text-align: center;
62 | width: 25%;
63 | padding: 1em;
64 | }
65 | .info {
66 | background-color: #aae;
67 | }
68 | ul.categories {
69 | list-style: none;
70 | list-style-type: none;
71 | }
72 | ul.categories li {
73 | display: inline;
74 | }
75 |
--------------------------------------------------------------------------------
/source/_themes/uwpce_slides2/static/slide_config.js:
--------------------------------------------------------------------------------
1 | var SLIDE_CONFIG = {
2 | // Slide settings
3 | settings: {
4 | title: 'Title Goes Here