The words Under construction in black text on a yellow background with diagonal black stipes surrounding it
I'm in the process of moving my site. It's still a work in progress. Please excuse the mess and broken links.

Learning Django By Making A Tutorial - Part 4

TODO: Pull subtitle into page object

`youtube: https://www.youtube.com/watch?v=WI-u3Drx77Q`

### [Start: 00:00:00] - Review

Started off with a little review of the process and how we got here.

### [Time: 00:12:05] - Links to Sublime Text 2 from hugo drafts site.

I setup links on the local version of my Hugo site to open drafts in Sublime Text 3. I realized I want to be able to open them in Sublime Text 2 sometime. Made a quick detour to get that going.

The original links uses the basic `open` command with no flags which worked because my system is setup to open `.md` files with Sublime Text 3. In order to get files to open with a different app, I had to pass the `-a` flag to `open` which tells it which app to use.

Here's the code:

code_start_default_section code_end_default_section

This is one of those things where it was a little annoyance, but instead of continuing to be annoyed, I wrote a little code to make the annoyance go away.

### [Time: 00:33:40] - Back to Django

Just making more progress here with Django testing and hooking pages up to the database for output.

### Table Of Contents

- Part 1 - Getting the home page to work - Part 2 - Reviewing the first draft and building a model, view, and url structure for a checklist page - Part 3 - Learning how to test. And, making a python module so that unittest's output is green instead of red when tests pass. - Part 4 - Part 5 - Working with forms and getting a pointer to generic views. - Part 6 - Review run-through and adding URLs.

### Links from the Stream

- Django Tutorial Part 10: Testing a Django web application - Learn web development - Django Web Framework (Python) - Learn web development - Hypertext Style: Cool URIs don't change. - Python - MDN Web Docs Glossary: Definitions of Web-related terms - URL dispatcher - Writing your first Django app, part 1 - Writing your first Django app, part 3

Debugging Stuff

I'm moving stuff around right now. All this below is helping me figure out where to put stuff

        -- title

Learning Django By Making A Tutorial - Part 4

-- p

`youtube: https://www.youtube.com/watch?v=WI-u3Drx77Q`

-- p

### [Start: 00:00:00] - Review

-- p

Started off with a little review of the process and how we got here.

-- p

### [Time: 00:12:05] - Links to Sublime Text 2 from hugo drafts site.

-- p

I setup links on the local version of my Hugo site to open drafts in Sublime Text 3. I realized I want to be able to open them in Sublime Text 2 sometime. Made a quick detour to get that going.

-- p

The original links uses the basic `open` command with no flags which worked because my system is setup to open `.md` files with Sublime Text 3. In order to get files to open with a different app, I had to pass the `-a` flag to `open` which tells it which app to use.

-- p

Here's the code:

-- code/
-- bash

shell_exec("open -a '/Applications/Sublime Text 2.app' /Users/alans/woodshed/alanwsmith.com/prod/content/2-quarts/index.md");
shell_exec("osascript -e 'tell application \"Sublime Text 2\" to activate'");

-- /code

-- p

This is one of those things where it was a little annoyance, but instead of continuing to be annoyed, I wrote a little code to make the annoyance go away.

-- p

### [Time: 00:33:40] - Back to Django

-- p

Just making more progress here with Django testing and hooking pages up to the database for output.

-- p

### Table Of Contents

-- p

- <<link|Part 1|/stream-notes-2020-10-06/>> - Getting the home page to work
- <<link|Part 2|/stream-notes-2020-10-08/>> - Reviewing the first draft and building a model, view, and url structure for a checklist page
- <<link|Part 3|/stream-notes-2020-10-09/>> - Learning how to test. And, making a python module so that unittest's output is green instead of red when tests pass. 
- <<link|Part 4|/stream-notes-2020-10-10/) - More progress with testing and getting database content to show up. (Also, updating my local Hugo site to launch into either Sublime Text 2, or Sublime Text 3.>>
- <<link|Part 5|/stream-notes-2020-10-10-2/>> - Working with forms and getting a pointer to generic views.
- <<link|Part 6|/stream-notes-2020-10-11/>> - Review run-through and adding URLs.

-- p

### Links from the Stream

-- p

- <<link|Django Tutorial Part 10: Testing a Django web application - Learn web development | MDN|https://developer.mozilla.org/en-US/docs/Learn/Server-side/Django/Testing>>
- <<link|Django Web Framework (Python) - Learn web development | MDN|https://developer.mozilla.org/en-US/docs/Learn/Server-side/Django>>
- <<link|Hypertext Style: Cool URIs don't change.|https://www.w3.org/Provider/Style/URI>>
- <<link|Python - MDN Web Docs Glossary: Definitions of Web-related terms | MDN|https://developer.mozilla.org/en-US/docs/Glossary/Python>>
- <<link|URL dispatcher | Django documentation | Django|https://docs.djangoproject.com/en/3.1/topics/http/urls/>>
- <<link|Writing your first Django app, part 1 | Django documentation | Django|https://docs.djangoproject.com/en/3.1/intro/tutorial01/>>
- <<link|Writing your first Django app, part 3 | Django documentation | Django|https://docs.djangoproject.com/en/3.1/intro/tutorial03/>>


-- categories
-- Django
-- Live Coding
-- Python

-- metadata
-- date: 2020-10-10 00:00:00
-- id: 20enkdkm
-- status: published
-- type: post
-- SCRUBBED_NEO: false
-- site: aws