add code fence support and fix a ton of lint issues

This commit is contained in:
ducoterra
2020-11-05 14:47:29 -05:00
parent 360bd07a44
commit 8014742933
3 changed files with 111 additions and 105 deletions

View File

@@ -8,9 +8,9 @@ Fortunately we can do some things to make your life easier. We can install an ID
(or skip to [I have a Mac](#i-have-a-mac))
### Install Git
### Install Git (windows)
Git is a version control program, but you can think of it as your best friend in the cold, dark world of data loss. Git will make sure you don't lose progress. It lets you save your code at various stages and
Git is a version control program, but you can think of it as your best friend in the cold, dark world of data loss. Git will make sure you don't lose progress. It lets you save your code at various stages and revert back to previous saves if you need to.
1. Head to <https://git-scm.com/>
@@ -20,7 +20,7 @@ Git is a version control program, but you can think of it as your best friend in
3. Run through the default install process
### Install Python
### Install Python (windows)
1. Head to <https://www.python.org/>
@@ -32,83 +32,83 @@ Git is a version control program, but you can think of it as your best friend in
![python_windows_install](img/day0/install_for_windows.gif)
### Install VSCode
### Install VSCode (windows)
Your most important tool as a programmer is a proper editor. It should offer you a wide selection of tools but get out of your way when you don't need it. VSCode is a great option in 2020. It has tons of extensions and support for almost every language you can throw at it.
1. Head to <https://code.visualstudio.com/>
1. Click on the download link
2. Click on the download link
![vscode_download](img/day0/code_download.png)
1. Run through the installer, select default options
3. Run through the installer, select default options
1. Open VSCode
4. Open VSCode
![vscode_open](img/day0/vscode_open.png)
1. Uncheck "Show welcome page on startup"
5. Uncheck "Show welcome page on startup"
![vscode_uncheck](img/day0/vscode_uncheck.gif)
1. Close out of the welcome page
6. Close out of the welcome page
![close_welcome](img/day0/close_welcome.gif)
1. Open the terinal with <kbd>ctrl</kbd>+<kbd>~</kbd>
7. Open the terinal with ++ctrl++ + ~
1. Click the dropdown that says `1: powershell` and click `Select Default Shell`
8. Click the dropdown that says `1: powershell` and click `Select Default Shell`
![select_default_shell_windows](img/day0/select_default_shell_windows.png)
1. Select Command Prompt
9. Select Command Prompt
![select_cmd_prompt](img/day0/select_cmd_prompt.png)
1. Kill the terminal by clicking the trash can icon
10. Kill the terminal by clicking the trash can icon
![kill_terminal](img/day0/kill_terminal.png)
1. Click the "extensions" button on the left to open the extensions page
11. Click the "extensions" button on the left to open the extensions page
![extension](img/day0/extension.png)
1. Search for "python"
12. Search for "python"
![search_python](img/day0/search_python.png)
1. Click on the first Python extension and click "install"
13. Click on the first Python extension and click "install"
![install_python](img/day0/install_python.png)
1. When the extension has finished installing, close out of the welcome window
14. When the extension has finished installing, close out of the welcome window
![close_welcome](img/day0/close_welcome.png)
1. Close out of the extension window
15. Close out of the extension window
![close_extension](img/day0/close_extension.png)
1. Reopen your document view by clicking the "documents" icon
16. Reopen your document view by clicking the "documents" icon
![select_docs](img/day0/select_docs.png)
### Create a "Projects" folder
### Create a "Projects" folder (windows)
I keep all my projects in a folder called "Projects" in my home directory. On Windows this is at `C:\Users\<your username>\Projects`. Create this folder now. Bookmark it, put it in your favorites, don't lose it.
1. In your `Projects` folder create another folder called `my_website`
2. Switch to VSCode You can use <kbd>alt</kbd>+<kbd>tab</kbd> to quickly switch between windows. Press <kbd>ctrl</kbd>+<kbd>k</kbd>+<kbd>o</kbd> and select the projects/my_website folder
2. Switch to VSCode You can use ++alt+tab++ to quickly switch between windows. Press ++ctrl++ + K + O and select the projects/my_website folder
![ctrl_ko](img/day0/ctrl_ko_windows.gif)
### Create a virtual environment
### Create a virtual environment (windows)
A python virtual environment is a folder that will hold your python installation for the project you're working on. You'll have a virtual environment for every project you create.
1. With your "my_website" folder open in VSCode open the terminal with <kbd>ctrl</kbd>+<kbd>~</kbd>
1. With your "my_website" folder open in VSCode open the terminal with ++ctrl++ + ~
![open_terminal_windows](img/day0/open_terminal_windows.gif)
@@ -126,7 +126,7 @@ A python virtual environment is a folder that will hold your python installation
![source_venv_windows](img/day0/source_venv_windows.gif)
### Install Django
### Install Django (windows)
Django is a pip package. Pip packages are other people's python code that you can download for free. In much the same way you downloaded VSCode and Python itself with your browser, we can download pip packages with "pip". Pip comes preinstalled with Python.
@@ -134,33 +134,33 @@ Django is a pip package. Pip packages are other people's python code that you ca
![pip_django](img/day0/pip_django.gif)
1. If you have a warning like above you can ignore it for now. Type `django-admin startproject config .`
2. If you have a warning like above you can ignore it for now. Type `django-admin startproject config .`
![startproject](img/day0/startproject.gif)
1. Click on `manage.py`. You should see VSCode activate python extensions in the bottom left and select an interpretor. ('venv': venv) should be selected. You can ignore the message that says "linter pylint is not installed" - just close out of it.
3. Click on `manage.py`. You should see VSCode activate python extensions in the bottom left and select an interpretor. ('venv': venv) should be selected. You can ignore the message that says "linter pylint is not installed" - just close out of it.
![open_manage](img/day0/open_manage.gif)
1. Close out of manage.py by clicking the 'x' at the top.
4. Close out of manage.py by clicking the 'x' at the top.
1. Type `python manage.py runserver`
5. Type `python manage.py runserver`
![runserver](img/day0/runserver.gif)
1. Open a browser and navigate to <http://localhost:8000>
6. Open a browser and navigate to <http://localhost:8000>
![localhost8000](img/day0/localhost8000.gif)
1. You should see an install success page. If so, congratulations! You have successfully installed Django.
7. You should see an install success page. If so, congratulations! You have successfully installed Django.
1. Stop running server by clicking in the terminal and typing <kbd>ctrl</kbd>+<kbd>C</kbd>. You have successfully completed Day 0!
8. Stop running server by clicking in the terminal and typing ++ctrl++ + C. You have successfully completed Day 0!
## I have a Mac
### Install Git
### Install Git (mac)
Git is a version control program, but you can think of it as your best friend in the cold, dark world of data loss. Git will make sure you don't lose progress. It lets you save your code at various stages and
Git is a version control program, but you can think of it as your best friend in the cold, dark world of data loss. Git will make sure you don't lose progress. It lets you save your code at various stages and revert back to previous saves if you need to.
1. Head to <https://git-scm.com/>
@@ -170,7 +170,7 @@ Git is a version control program, but you can think of it as your best friend in
3. Run through the default install process
### Install Python
### Install Python (mac)
1. Head to <https://www.python.org/>
@@ -182,87 +182,87 @@ Git is a version control program, but you can think of it as your best friend in
![install_for_mac](img/day0/install_for_mac.gif)
### Install VSCode
### Install VSCode (mac)
Your most important tool as a programmer is a proper editor. It should offer you a wide selection of tools but get out of your way when you don't need it. VSCode is a great option in 2020. It has tons of extensions and support for almost every language you can throw at it.
1. Head to <https://code.visualstudio.com/>
1. Click on the download link
2. Click on the download link
![vscode_download](img/day0/code_download.png)
1. Run through the installer, select default options
3. Run through the installer, select default options
1. Open VSCode
4. Open VSCode
![vscode_open](img/day0/vscode_open.png)
1. Uncheck "Show welcome page on startup"
5. Uncheck "Show welcome page on startup"
![vscode_uncheck](img/day0/vscode_uncheck.gif)
1. Close out of the welcome page
6. Close out of the welcome page
![close_welcome](img/day0/close_welcome.gif)
1. Click the "extensions" button on the left to open the extensions page
7. Click the "extensions" button on the left to open the extensions page
![extension](img/day0/extension.png)
1. Search for "python"
8. Search for "python"
![search_python](img/day0/search_python.png)
1. Click on the first Python extension and click "install"
9. Click on the first Python extension and click "install"
![install_python](img/day0/install_python.png)
1. When the extension has finished installing, close out of the welcome window
10. When the extension has finished installing, close out of the welcome window
![close_welcome](img/day0/close_welcome.png)
1. Close out of the extension window
11. Close out of the extension window
![close_extension](img/day0/close_extension.png)
1. Reopen your document view by clicking the "documents" icon
12. Reopen your document view by clicking the "documents" icon
![select_docs](img/day0/select_docs.png)
### Create a "Projects" folder
### Create a "Projects" folder (mac)
I keep all my projects in a folder called "Projects" in my home directory. On MacOS this is at `/Users/<your username>/Projects`. Create this folder now. Bookmark it, put it in your favorites, don't lose it.
1. In your `Projects` folder create another folder called `my_website`
1. Switch to VSCode You can use <kbd>cmd</kbd>+<kbd>tab</kbd> to quickly switch between windows. Press <kbd>ctrl</kbd>+<kbd>o</kbd> and select the projects/my_website folder
2. Switch to VSCode You can use ++cmd+tab++ to quickly switch between windows. Press ++ctrl++ + O and select the projects/my_website folder
![ctrl_ko](img/day0/ctrl_o_mac.gif)
### Create a virtual environment
### Create a virtual environment (mac)
A python virtual environment is a folder that will hold your python installation for the project you're working on. You'll have a virtual environment for every project you create.
1. With your "my_website" folder open in VSCode open the terminal with <kbd>ctrl</kbd>+<kbd>~</kbd>
1. With your "my_website" folder open in VSCode open the terminal with ++ctrl++ + ~
![open_terminal](img/day0/open_terminal.gif)
1. Type `python3 --version`
2. Type `python3 --version`
![python_version](img/day0/python_version.gif)
1. If you see `Python 3.9.#` you have the correct version, if you see another version try typing `python3.9 --version`. If that doesn't work you'll need to reinstall python 3.9.
3. If you see `Python 3.9.#` you have the correct version, if you see another version try typing `python3.9 --version`. If that doesn't work you'll need to reinstall python 3.9.
1. Type `python3 -m venv venv`. You'll see a folder appear on the left side of VSCode.
4. Type `python3 -m venv venv`. You'll see a folder appear on the left side of VSCode.
![venv_mac](img/day0/venv_mac.gif)
1. Source your venv: type `source venv/bin/activate`. You'll see a (venv) appear next to your terminal cursor.
5. Source your venv: type `source venv/bin/activate`. You'll see a (venv) appear next to your terminal cursor.
![source_venv_mac](img/day0/source_venv_mac.gif)
### Install Django
### Install Django (mac)
Django is a pip package. Pip packages are other people's python code that you can download for free. In much the same way you downloaded VSCode and Python itself with your browser, we can download pip packages with "pip". Pip comes preinstalled with Python.
@@ -270,24 +270,24 @@ Django is a pip package. Pip packages are other people's python code that you ca
![pip_django](img/day0/pip_django.gif)
1. If you have a warning like above you can ignore it for now. Type `django-admin startproject config .`
2. If you have a warning like above you can ignore it for now. Type `django-admin startproject config .`
![startproject](img/day0/startproject.gif)
1. Click on `manage.py`. You should see VSCode activate python extensions in the bottom left and select an interpretor. ('venv': venv) should be selected. You can ignore the message that says "linter pylint is not installed" - just close out of it.
3. Click on `manage.py`. You should see VSCode activate python extensions in the bottom left and select an interpretor. ('venv': venv) should be selected. You can ignore the message that says "linter pylint is not installed" - just close out of it.
![open_manage](img/day0/open_manage.gif)
1. Close out of manage.py by clicking the 'x' at the top.
4. Close out of manage.py by clicking the 'x' at the top.
1. Type `python manage.py runserver`
5. Type `python manage.py runserver`
![runserver](img/day0/runserver.gif)
1. Open a browser and navigate to <http://localhost:8000>
6. Open a browser and navigate to <http://localhost:8000>
![localhost8000](img/day0/localhost8000.gif)
1. You should see an install success page. If so, congratulations! You have successfully installed Django.
7. You should see an install success page. If so, congratulations! You have successfully installed Django.
1. Stop running server by clicking in the terminal and typing <kbd>ctrl</kbd>+<kbd>C</kbd>. You have successfully completed Day 0!
8. Stop running server by clicking in the terminal and typing ++ctrl++ + C. You have successfully completed Day 0!