8000 Restructure tutorial to separate instructions based on operating system by amakarudze · Pull Request #1796 · DjangoGirls/tutorial · GitHub
[go: up one dir, main page]

Skip to content

Restructure tutorial to separate instructions based on operating system #1796

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 20 commits into
base: restructure-tutorial
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
564152a
Switch to actions/deploy-pages
ekohl Apr 6, 2023
39b7faa
Merge pull request #1791 from ekohl/remove-need-for-gh-pages-branch
amakarudze Apr 19, 2023
00446f4
Split setup instructions and summary
amakarudze Apr 19, 2023
ab0d913
Restructure content by OS, refactor installation steps
amakarudze Apr 21, 2023
fdbbb86
Remove unnecessary files from Chromebook folder
amakarudze Apr 21, 2023
91ee4c3
Fix Python installation and introduction sections
amakarudze Apr 21, 2023
db9e969
Fix django installation instructions
amakarudze Apr 21, 2023
efe896a
Restruture content up to Python introduction
amakarudze Apr 27, 2023
8fc2734
Refactor deploy folder, delete reduntant folders
amakarudze Apr 28, 2023
5368e73
Fix line breaks at 80 for chromebook/README.md
amakarudze Jun 1, 2023
11488b4
Fix lines for chromebook/django_start_project/README.md
amakarudze Jun 1, 2023
0c3e2d7
Fix line length for macosx/django_start_project/README.md
amakarudze Jun 1, 2023
808a0fd
Fix runcode file line length
amakarudze Jun 1, 2023
b3f114c
Fix line length for windows and runcode
amakarudze Jun 19, 2023
7bd90b9
Fix lines for code editor folder
amakarudze Jun 19, 2023
dcde212
Fix line length for more files
amakarudze Jun 19, 2023
3dd54d8
Fix link for runcode django_start_project
amakarudze Jun 19, 2023
213850f
Fix navigation issues, refactor SUMMARY.md
amakarudze Jun 29, 2023
cf28896
fix: relative image paths in specific os folders
jwhhh Oct 5, 2023
19ba762
Merge pull request #1 from jwhhh/change-structure-1792
amakarudze Nov 25, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Split setup instructions and summary
  • Loading branch information
amakarudze committed Apr 19, 2023
commit 00446f47ed7093d2a708b92ad1f30a4456c38bcb
2 changes: 1 addition & 1 deletion LANGS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
* [🇺🇸 English](en/)
* [🇺🇸 English](en/OS.md)
* [🇧🇬 Български (beta)](bg/)
* [🇨🇿 Čeština (beta)](cs/)
* [🇩🇪 Deutsch](de/)
Expand Down
5 changes: 5 additions & 0 deletions en/OS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
* [ ChromeBook](chromebook/)
* [ Linux](linux/)
* [ Mac OSX](macosx/)
* [ RunCode Cloud](runcode/)
* [ Windows](windows/)
24 changes: 24 additions & 0 deletions en/chromebook/SUMMARY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Summary

* [Introduction](README.md)
* [Installation](chromebook_setup/README.md)
* [How the Internet works](../how_the_internet_works/README.md)
* [Introduction to command line](../linux/intro_to_command_line/README.md)
* [Introduction to Python](python_introduction/README.md)
* [What is Django?](django/README.md)
* [Django installation](django_installation/README.md)
* [Your first Django project!](django_start_project/README.md)
* [Django models](django_models/README.md)
* [Django admin](django_admin/README.md)
* [Deploy!](deploy/README.md)
* [Django URLs](django_urls/README.md)
* [Django views – time to create!](django_views/README.md)
* [Introduction to HTML](html/README.md)
* [Django ORM (Querysets)](django_orm/README.md)
* [Dynamic data in templates](dynamic_data_in_templates/README.md)
* [Django templates](django_templates/README.md)
* [CSS – make it pretty](css/README.md)
* [Template extending](template_extending/README.md)
* [Extend your application](extend_your_application/README.md)
* [Django Forms](django_forms/README.md)
* [What's next?](whats_next/README.md)
7 changes: 7 additions & 0 deletions en/chromebook/chromebook_setup/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Chromebook setup

> **Note** If you already worked through the
[installation steps](../installation/README.md), no need to do this again – you
can skip straight ahead to [How the Internet works](../how_the_internet_works/README.md).

{% include "/chromebook_setup/instructions.md" %}
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
You can [skip right over this section](http://tutorial.djangogirls.org/en/installation/#install-python) if you're not using a Chromebook. If you
are, your installation experience will be a little different. You can ignore the
rest of the installation instructions.

### Cloud IDE (PaizaCloud Cloud IDE, AWS Cloud9, Glitch.com)

Cloud IDE is a tool that gives you a code editor and access to a computer running
on the Internet where you can install, write, and run the software. For the duration
of the tutorial, cloud IDE will act as your _local machine_. You'll still be
running commands in a terminal interface just like your classmates on OS X,
Ubuntu, or Windows, but your terminal will be connected to a computer running
somewhere else that cloud IDE sets up for you.
Here are the instructions for cloud IDEs (PaizaCloud Cloud IDE, AWS Cloud9, Glitch.com).
Cloud IDE is a tool that gives you a code editor and access to a computer
running on the Internet where you can install, write, and run the software.
For the duration of the tutorial, cloud IDE will act as your _local machine_.
You'll still be running commands in a terminal interface just like your
classmates on OS X, Ubuntu, or Windows, but your terminal will be connected to
a computer running somewhere else that cloud IDE sets up for you.
Here are the instructions for cloud IDEs (PaizaCloud Cloud IDE, AWS Cloud9,
Glitch.com).
You can choose one of the cloud IDEs, and follow the instruction of the cloud IDE.

#### PaizaCloud Cloud IDE
Expand All @@ -32,24 +30,24 @@ The terminal on the PaizaCloud Cloud IDE is prepared for your instructions.
You can resize or maximize that window to make it a bit bigger.

#### AWS Cloud9
Currently Cloud 9 requires you to sign up with AWS and enter credit card
information.
Currently Cloud 9 requires you to sign up with AWS and enter credit card information.

1. Install Cloud 9 from the [Chrome web store](https://chrome.google.com/webstore/detail/cloud9/nbdmccoknlfggadpfkmcpnamfnbkmkcp)
1. Install Cloud 9 from the
[Chrome web store](https://chrome.google.com/webstore/detail/cloud9/nbdmccoknlfggadpfkmcpnamfnbkmkcp)
2. Go to [c9.io](https://c9.io) and click _Get started with AWS Cloud9_
3. Sign up for an AWS account (requires credit card information, but you can
use it for free)
4. In the AWS Dashboard, enter _Cloud9_ in the search bar and click it
5. In the Cloud 9 dashboard, click _Create environment_
6. Name it _django-girls_
7. While configuring settings, select _Create a new instance for environment
7. While configuring settings, select _Create a new instance for environment
(EC2)_ for "Environment Type" and the _t2.micro_ "Instance type" (it should
say "Free-tier eligible."). The default cost-saving setting is fine and you
can keep the other defaults.
8. Click _Next step_
9. Click _Create environment_

Now you should see an interface with a sidebar, a big main window with some
Now you should see an interface with a sidebar, a big main window with some
text, and a small window at the bottom that looks something like this:

{% filename %}bash{% endfilename %}
Expand All @@ -58,15 +56,18 @@ yourusername:~/workspace $
```

This bottom area is your terminal. You can use the terminal to send instructions
to the remote Cloud 9 computer. You can resize that window to make it a bit
bigger.
to the remote Cloud 9 computer.
You can resize that window to make it a bit bigger.

#### Glitch.com Cloud IDE

1. Go to [Glitch.com](https://glitch.com/)
2. Sign up for an account (https://glitch.com/signup) or use your GitHub account if you have one. (See GitHub instructions below.)
2. Sign up for an account (https://glitch.com/signup) or use your GitHub account
if you have one. (See GitHub instructions below.)
3. Click _New Project_ and choose _hello-webpage_
4. Click on the Tools dropdown list (at the bottom left side of the window), then on Terminal button to open terminal tab with a prompt like this:
4. Click on the Tools dropdown list (at the bottom left side of the window),
then on Terminal button to open terminal
tab with a prompt like this:

{% filename %}Terminal{% endfilename %}
```
Expand Down Expand Up @@ -108,15 +109,17 @@ python3 manage.py migrate
python3 manage.py runserver $PORT
```

Once these files are created, go to the Terminal and execute the following commands to create your first Django project:
Once these files are created, go to the Terminal and execute the following
commands to create your first Django project:

{% filename %}Terminal{% endfilename %}
```
django-admin.py startproject mysite .
refresh
```

In order to see detailed error messages, you can activate Django debug logs for your Glitch application.
In order to see detailed error messages, you can activate Django debug logs
for your Glitch application.
Simply add the following at the end of the `mysite/settings.py` file.

{% filename %}mysite/settings.py{% endfilename %}
Expand All @@ -140,18 +143,21 @@ LOGGING = {
},
}
```
This will create a `debug.log` file detailing Django operations and any error messages that might come up, making it much easier to fix if your website does not work.
This will create a `debug.log` file detailing Django operations and any error
messages that might come up, making it much easier to fix if your website does not work.

The initial restarting of the Glitch project should fail.
(If you click on the top dropdown button `Show` then click on `In a New Window`, you will receive a `DisallowedHost` error message.)
Do not worry about it at this stage, the tutorial will fix this as soon as you update the Django settings of your project in the `mysite/settings.py` file.
(If you click on the top dropdown button `Show` then click on `In a New Window`,
you will receive a `DisallowedHost` error message.)
Do not worry about it at this stage, the tutorial will fix this as soon as you
update the Django settings of your project in the `mysite/settings.py` file.

### Virtual Environment

A virtual environment (also called a virtualenv) is like a private box we can
stuff useful computer code into for a project we're working on. We use them to
keep the various bits of code we want for our various projects separate so
things don't get mixed up between projects.
A virtual environment (also called a virtualenv) is like a private box we can
stuff useful computer code into for a project we're working on.
We use them to keep the various bits of code we want for our various projects
separate so things don't get mixed up between projects.

Run:

Expand Down Expand Up @@ -185,3 +191,5 @@ as it becomes more complete.

Thus, sign up for a new Python Anywhere account at
[www.pythonanywhere.com](https://www.pythonanywhere.com).

{% include "/deploy/signup_pythonanywhere.md" %}
5 changes: 0 additions & 5 deletions en/chromebook_setup/README.md

This file was deleted.

15 changes: 8 additions & 7 deletions en/code_editor/README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
# Code editor

> For readers at home: this chapter is covered in the [Installing Python & Code Editor](https://www.youtube.com/watch?v=pVTaqzKZCdA&t=4m43s) video.
> For readers at home: this chapter is covered in the
[Installing Python & Code Editor](https://www.youtube.com/watch?v=pVTaqzKZCdA&t=4m43s)
video.

You're about to write your first line of code, so it's time to download a code editor!
You're about to write your first line of code, so it's time to download a code
editor!

> **Note** If you're using a Chromebook, skip this chapter and make sure you follow the [Chromebook Setup](../chromebook_setup/README.md) instructions. The cloud IDE you chose (PaizaCloud Cloud IDE or AWS Cloud9) includes a code editor, and when you open a file in your IDE from the File menu, you will automatically be using the editor.

> **Note** You might have done this earlier in the [Installation chapter](../installation/README.md) – if so, you can skip right ahead to the next chapter!

> **Note** If you have followed [RunCode Setup](../cloud_development_setup/README.md) you can skip this section as Visual Studio Code is pre-installed on the platform.
> **Note** You might have done this earlier in the
[Installation chapter](../installation/README.md) – if so, you can skip right
ahead to the next chapter!

{% include "/code_editor/instructions.md" %}
33 changes: 25 additions & 8 deletions en/code_editor/instructions.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
There are a lot of different editors and it largely boils down to personal preference. Most Python programmers use complex but extremely powerful IDEs (Integrated Development Environments), such as PyCharm. As a beginner, however, that's probably less suitable; our recommendations are equally powerful, but a lot simpler.
There are a lot of different editors and it largely boils down to personal
preference.
Most Python programmers use complex but extremely powerful IDEs
(Integrated Development Environments), such as PyCharm.
As a beginner, however, that's probably less suitable; our recommendations
are equally powerful, but a lot simpler.

Our suggestions are below, but feel free to ask your coach what their preferences are – it'll be easier to get help from them.
Our suggestions are below, but feel free to ask your coach what their
preferences are – it'll be easier to get help from them.

## Visual Studio Code

Visual Studio Code is a source code editor developed by Microsoft for Windows, Linux and macOS. It includes support for debugging, embedded Git control, syntax highlighting, intelligent code completion, snippets, and code refactoring.
Visual Studio Code is a source code editor developed by Microsoft for Windows,
Linux and macOS.
It includes support for debugging, embedded Git control, syntax highlighting,
intelligent code completion, snippets, and code refactoring.

[Download it here](https://code.visualstudio.com/)

Expand All @@ -16,17 +25,25 @@ Gedit is an open-source, free editor, available for all operating systems.

## Sublime Text

Sublime Text is a very popular editor with a free evaluation period and it's available for all operating systems.
Sublime Text is a very popular editor with a free evaluation period and it's
available for all operating systems.

[Download it here](https://www.sublimetext.com/)

## Why are we installing a code editor?

You might be wondering why we are installing this special code editor software, rather than using something like Word or Notepad.
You might be wondering why we are installing this special code editor software,
rather than using something like Word or Notepad.

The first reason is that code needs to be **plain text**, and the problem with programs like Word and Textedit is that they don't actually produce plain text, they produce rich text (with fonts and formatting), using custom formats like [RTF (Rich Text Format)](https://en.wikipedia.org/wiki/Rich_Text_Format).
The first reason is that code needs to be **plain text**, and the problem with
programs like Word and Textedit is that they don't actually produce plain text,
they produce rich text (with fonts and formatting), using custom formats like
[RTF (Rich Text Format)](https://en.wikipedia.org/wiki/Rich_Text_Format).

The second reason is that code editors are specialized for editing code, so they can provide helpful features like highlighting code with color according to its meaning, or automatically closing quotes for you.
The second reason is that code editors are specialized for editing code, so they
can provide helpful features like highlighting code with color according to its
meaning, or automatically closing quotes for you.

We'll see all this in action later. Soon, you'll come to think of your trusty old code editor as one of your favorite tools. :)
We'll see all this in action later. Soon, you'll come to think of your trusty
old code editor as one of your favorite tools. :)

35 changes: 35 additions & 0 deletions en/linux/SUMMARY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Summary

* [Introduction](README.md)
* [Installation](installation/README.md)
* [Installation (OS X/Windows/Linux)](installation/README.md#osx-windows-linux)
* [Command Line](installation/README.md#intro-command-line)
* [Python](installation/README.md#python)
* [Code Editor](installation/README.md#code-editor)
* [Virtual Environment](installation/README.md#virtualenv)
* [Django](installation/README.md#django)
* [Git](installation/README.md#git)
* [GitHub](installation/README.md#github-account)
* [PythonAnywhere](installation/README.md#pythonanywhere-account)
* [How the Internet works](how_the_internet_works/README.md)
* [Introduction to command line](intro_to_command_line/README.md)
* [Python installation](python_installation/README.md)
* [Code editor](code_editor/README.md)
* [Introduction to Python](python_introduction/README.md)
* [What is Django?](django/README.md)
* [Django installation](django_installation/README.md)
* [Your first Django project!](django_start_project/README.md)
* [Django models](django_models/README.md)
* [Django admin](django_admin/README.md)
* [Deploy!](deploy/README.md)
* [Django URLs](django_urls/README.md)
* [Django views – time to create!](django_views/README.md)
* [Introduction to HTML](html/README.md)
* [Django ORM (Querysets)](django_orm/README.md)
* [Dynamic data in templates](dynamic_data_in_templates/README.md)
* [Django templates](django_templates/README.md)
* [CSS – make it pretty](css/README.md)
* [Template extending](template_extending/README.md)
* [Extend your application](extend_your_application/README.md)
* [Django Forms](django_forms/README.md)
* [What's next?](whats_next/README.md)
99 changes: 99 additions & 0 deletions en/linux/installation/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
# If you're doing the tutorial at home

If you're doing the tutorial at home, not at one of the
[Django Girls events](https://djangogirls.org/events/), you can completely skip
this chapter now and go straight to the
[How the Internet works](../how_the_internet_works/README.md) chapter.

This is because we cover installing things as they are needed in the tutorial
-- this is just an additional page that gathers all of the installation
instructions in one place (which is useful for some workshop formats).
You can choose to install everything that is on this page right now if you wish.
But if you want to start learning things before installing a bunch of stuff on
your computer, skip this chapter and we will explain the installation parts to you
later on, as they are needed.

Good luck!

# If you're attending a workshop

If you are attending one of the [Django Girls events](https://djangogirls.org/events/):
- Your workshop may have an "installation party" before the main workshop. If
you are at an installation party, this page is for you!
Follow the instructions here to get everything you need for the workshop
installed, with the help of the coaches if needed.
Then at the main workshop, you'll be able to skip installation instructions
you'll encounter in the main tutorial when you get to them.
- The organizers of your workshop may have asked you to try at home to install
everything on your computer before the workshop starts. If you have been asked
to do that, this page is for you!
Follow the instructions here, as best you can.
Then at the main workshop, when you get to an installation step in the main
tutorial, if you were not able to get that piece installed you can get help from
your coach.
- If your workshop does not have an installation party (or you couldn't attend),
and if the organizers didn't ask you to try to install everything before you
arrived, skip this page and go straight to the
[How the Internet works](../how_the_internet_works/README.md) chapter.
You'll be installing everything you need as you work through the tutorial.

# Installation
In this tutorial you will be building a blog. In order to do that, as you go
through the tutorial you'll be instructed on how to
install various software on your computer and set up some online accounts as
needed.
This page gathers all of the installation and sign-up instructions in one place
(which is useful for some workshop formats).

To install software on your machine, follow the instructions below:

## Brief intro to the command line {#intro-command-line}
Many of the steps below reference the "console", "terminal", "command window",
or "command line" -- these all mean the same thing: a window on your computer
where you can enter commands.
When you get to the main tutorial, you'll learn more about the command line.
For now, the main thing you need to know is how to open a command window and
what it looks like:

{% include "/intro_to_command_line/open_instructions.md" %}

## Install Python {#python}
{% include "/python_installation/instructions.md" %}

## Install a code editor {#code-editor}
{% include "/code_editor/instructions.md" %}

## Set up virtualenv and install Django {#virtualenv}
{% include "/django_installation/instructions.md" %}

## Install Git {#git}
{% include "/deploy/install_git.md" %}

## Create a GitHub account {#github-account}
Go to [GitHub.com](https://www.github.com) and sign up for a new, free user
account.
Be sure to remember your password (add it to your password manager, if you use one).

## Create a PythonAnywhere account {#pythonanywhere-account}
{% include "/deploy/signup_pythonanywhere.md" %}

# Start reading

Congratulations, you are all set up and ready to go! If you still have some
time before the workshop, it would be useful to start reading a few of the
beginning chapters:

* [How the internet works](../how_the_internet_works/README.md)

* [Introduction to the command line](../intro_to_command_line/README.md)

* [Introduction to Python](../python_introduction/README.md)

* [What is Django?](../django/README.md)


# Enjoy the workshop!

When you begin the workshop, you'll be able to go straight to
[Your first Django project!](../django_start_project/README.md) because you
already covered the material in the earlier chapters.
Loading
0