Learning Django By Making A Tutorial - Part 4

October - 2020

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:

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'");

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 - 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.)
  • Part 5 - Working with forms and getting a pointer to generic views.
  • Part 6 - Review run-through and adding URLs.

Links from the Stream