<commit_before>---
title: Week 9 Day 2
---

### Topics for Today
* Heroku Deployment
* JQuery Events
* JQuery UI

### Heroku Guide
* [Django on Heroku](https://devcenter.heroku.com/articles/getting-started-with-django#wsgi-py)

### In Class
* [Chirper Live](https://github.com/tiy-lv-python-2015-06/chirper)
* App Prep
  * `mkdir collectstatic`
  * `touch .gitkeep`
  * Create 404.html and 500.html error pages
  * Convert app to postgres
  * `pip install django-toolbelt`
  * `pip freeze > requirements.txt`
* Heroku
  * Install [heroku toolbelt](https://devcenter.heroku.com/articles/getting-started-with-python#set-up)
  * Create a file called `heroku-settings.py` in the same directory as `settings.py` [exmple](https://github.com/tiy-lv-python-2015-06/chirper/blob/master/chirper/heroku-settings.py)
  * Create `Procfile` usually something like `web: gunicorn chirper.wsgi --log-file -`
  * Create `runtime.txt` and set it to your python version `python-3.4.3`
  * Alter `wsgi.py` to import Cling and wrap `get_wsgii_application` [exmple](https://github.com/tiy-lv-python-2015-06/chirper/blob/master/chirper/wsgi.py)
  * Create the heroku app `heroku create {subdomain}` subdomain is not required<commit_msg>Fixing static directory<commit_after>---
title: Week 9 Day 2
---

### Topics for Today
* Heroku Deployment
* JQuery Events
* JQuery UI

### Heroku Guide
* [Django on Heroku](https://devcenter.heroku.com/articles/getting-started-with-django#wsgi-py)

### In Class
* [Chirper Live](https://github.com/tiy-lv-python-2015-06/chirper)
* App Prep
  * `mkdir staticfiles`
  * `touch .gitkeep`
  * Create 404.html and 500.html error pages
  * Convert app to postgres
  * `pip install django-toolbelt`
  * `pip freeze > requirements.txt`
* Heroku
  * Install [heroku toolbelt](https://devcenter.heroku.com/articles/getting-started-with-python#set-up)
  * Create a file called `heroku-settings.py` in the same directory as `settings.py` [exmple](https://github.com/tiy-lv-python-2015-06/chirper/blob/master/chirper/heroku-settings.py)
  * Create `Procfile` usually something like `web: gunicorn chirper.wsgi --log-file -`
  * Create `runtime.txt` and set it to your python version `python-3.4.3`
  * Alter `wsgi.py` to import Cling and wrap `get_wsgii_application` [exmple](https://github.com/tiy-lv-python-2015-06/chirper/blob/master/chirper/wsgi.py)
  * Create the heroku app `heroku create {subdomain}` subdomain is not required
{'fraction_non_alphanumeric': 0.14050944946589974, 'fraction_numerical': 0.0238290879211175, 'mean_word_length': 4.169851380042463, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 10, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1862086', 'n_tokens_mistral': 922, 'n_tokens_neox': 847, 'n_words': 203}