Skip to content

Commit affde14

Browse files
committed
Separate RunCode setup and make suggested changes
1 parent 69a4c9b commit affde14

File tree

9 files changed

+139
-63
lines changed

9 files changed

+139
-63
lines changed

en/SUMMARY.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,17 @@
22

33
* [Introduction](README.md)
44
* [Installation](installation/README.md)
5-
* [Command Line](installation/README.md#command-line)
5+
* [Installation (RunCode Cloud)](cloud_development_setup/README.md)
6+
* [Installation (Chromebook)](chromebook_setup/README.md)
7+
* [Installation (OS X/Windows/Linux)](installation/README.md#osx-windows-linux)
8+
* [Command Line](installation/README.md#intro-command-line)
69
* [Python](installation/README.md#python)
710
* [Code Editor](installation/README.md#code-editor)
811
* [Virtual Environment](installation/README.md#virtualenv)
912
* [Django](installation/README.md#django)
1013
* [Git](installation/README.md#git)
1114
* [GitHub](installation/README.md#github-account)
1215
* [PythonAnywhere](installation/README.md#pythonanywhere-account)
13-
* [Installation (chromebook)](chromebook_setup/README.md)
14-
* [Installation (RunCode Cloud)](cloud_development_setup/README.md)
1516
* [How the Internet works](how_the_internet_works/README.md)
1617
* [Introduction to command line](intro_to_command_line/README.md)
1718
* [Python installation](python_installation/README.md)

en/cloud_development_setup/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# RunCode Cloud Environment setup
22

3-
> **Note** If you already worked through the [installation steps](../installation/README.md), no need to do this again – you can skip straight ahead to [Introduction to Python](../python_introduction/README.md).
3+
> **Note** If you already worked through the [installation steps](../installation/README.md), you do not need to also complete the RunCode Cloud Environment setup. Please skip straight to [Introduction to Python](../python_introduction/README.md).
44
55
{% include "/cloud_development_setup/instructions.md" %}
Lines changed: 85 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,93 @@
1-
You can [skip right over this section](http://tutorial.djangogirls.org/en/installation/#install-python)
2-
if you're not using RunCode Cloud Development environment. If you are, your installation experience will be a little different.
3-
You can ignore the rest of the installation instructions as you do not need to install anything locally,
4-
you just need to create three online accounts.
1+
If you are using RunCode Cloud development environment, your installation experience will be a little different. You can ignore the rest of the installation instructions as you do not need to install anything locally, you just need to create three online accounts.
52

6-
## About RunCode
7-
RunCode is a cloud development environment which people can use without the need to install Python, Django and Visual
8-
Studio Code editor locally on their machines. This cloud environment enables anyone to work from any device that has
9-
an internet connection, including cellphones, tablets, laptop or desktop.
10-
11-
This removes the need for you to install packages on a borrowed laptop or the need for you to own a laptop to attend the workshop or follow this tutorial from home. This will also save you time required for setting up your development
12-
environment and you can always do the installation later own as a follow-up after finishing the tutorial.
3+
## Create a GitHub account
4+
Go to [GitHub.com](https://github.com/) and sign up for a new, free user account.Skip this step if you already did
5+
this in the previous step so you could sign up for RunCode.
136

147
## Create a RunCode account
158
Go to [RunCode.io](https://runcode.io/) and sign up for a new, free user account. You need to have a
169
[Google.com](https://www.google.com/intl/en-GB/gmail/about/) account or [GitHub.com](https://github.com/)
1710
which you can sign up with.
1811

19-
## Create a GitHub account
20-
Go to [GitHub.com](https://github.com/) and sign up for a new, free user account.Skip this step if you already did
21-
this in the previous step so you could sign up for RunCode.
22-
2312
## Create a PythonAnywhere account {#pythonanywhere-account}
24-
{% include "/deploy/signup_pythonanywhere.md" %}
13+
{% include "/deploy/signup_pythonanywhere.md" %}
14+
15+
## Command Line
16+
To open the Ubuntu terminal on RunCode, go to Workspaces → New Workspace → Blank. This will open a new Visual Studio Code workspace which has an Ubuntu terminal in the bottom pane.
17+
18+
Altenatively, you can go to Workspaces → New Workspace → Jupyter Lab. This will open a Python prompt which is depicted by `>>>`, you can type `exit()` to get back to the Ubuntu terminal.
19+
20+
Ubuntu is a version of Linux so for all command line instructions later in the tutorial you can follow Linux instructions.
21+
22+
## Virtual Environment
23+
Before we install Django we will get you to install an extremely useful tool to help keep your coding environment tidy on your computer. It's possible to skip this step, but it's highly recommended. Starting with the best possible setup will save you a lot of trouble in the future!
24+
25+
So, let's create a **virtual environment** (also called a *virtualenv*). Virtualenv will isolate your Python/Django setup on a per-project basis. This means that any changes you make to one website won't affect any others you're also developing. Neat, right?
26+
27+
All you need to do is find a directory in which you want to create the `virtualenv`; your home directory, for example. On Windows, it might look like `C:\Users\Name\` (where `Name` is the name of your login).
28+
29+
For this tutorial we will be using a new directory `djangogirls` from your home directory:
30+
31+
{% filename %}command-line{% endfilename %}
32+
```
33+
$ mkdir djangogirls
34+
$ cd djangogirls
35+
```
36+
37+
We will make a virtualenv called `myvenv`.
38+
39+
To create a new `virtualenv` on RunCode, you first need to install the `virtualenv` module. To do so, first you need to update
40+
the packages in your environment
41+
>```
42+
>$ sudo apt-get update -y
43+
>```
44+
> then install `virtualenv` by running the command:
45+
>```
46+
>$ sudo apt-get install -y virtualenv
47+
>```
48+
49+
> After this you can create the `virtualenv` run the command:
50+
>```
51+
>$ virtualenv -p python myvenv
52+
>```
53+
> and a new `virtualenv` with the name `myvenv` or whatever name you chose should be created in your `djangogirls` folder.
54+
55+
## Working with a Virtual Environment
56+
>Start your virtual environment by running:
57+
>```
58+
>$ . myvenv/bin/activate
59+
>```
60+
61+
### Installing packages with requirements
62+
63+
A requirements file keeps a list of dependencies to be installed using
64+
`pip install`:
65+
66+
First create a `requirements.txt` file inside of the `djangogirls/` folder, using the code editor that you installed earlier. You do this by opening a new file in the code editor and then saving it as `requirements.txt` in the `djangogirls/` folder. Your directory will look like this:
67+
68+
```
69+
djangogirls
70+
├── myvenv
71+
│ └── ...
72+
└───requirements.txt
73+
```
74+
75+
In your `djangogirls/requirements.txt` file you should add the following text:
76+
77+
{% filename %}djangogirls/requirements.txt{% endfilename %}
78+
```
79+
Django~={{ book.django_version }}
80+
```
81+
82+
Now, run `pip install -r requirements.txt` to install Django.
83+
84+
{% filename %}command-line{% endfilename %}
85+
```
86+
(myvenv) ~$ pip install -r requirements.txt
87+
Collecting Django~={{ book.django_version }} (from -r requirements.txt (line 1))
88+
Downloading Django-{{ book.django_version }}-py3-none-any.whl (7.9MB)
89+
Installing collected packages: Django
90+
Successfully installed Django-{{ book.django_version }}
91+
```
92+
93+
That's it! You're now (finally) ready to create a Django application!

en/code_editor/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,6 @@ You're about to write your first line of code, so it's time to download a code e
88
99
> **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!
1010
11+
> **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.
12+
1113
{% include "/code_editor/instructions.md" %}

en/django_installation/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
> **Note** If you're using a Chromebook, skip this chapter and make sure you follow the [Chromebook Setup](../chromebook_setup/README.md) instructions.
44
5+
> **Note** If you're using RunCode, skip this chapter and make sure you follow the [RunCode Setup](../cloud_development_setup/README.md) instructions.
6+
57
> **Note** If you already worked through the [installation steps](../installation/README.md) then you've already done this – you can go straight to the next chapter!
68
79
{% include "/django_installation/instructions.md" %}

en/django_installation/instructions.md

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -104,25 +104,6 @@ $ python3 -m venv myvenv
104104
105105
<!--endsec-->
106106
107-
<!--sec data-title="Virtual Environment: RunCode" data-id="virtualenv-runcode" -->
108-
To create a new `virtualenv` on RunCode, you first need to install the `virtualenv` module. To do so, first you need to update
109-
the packages in your environment
110-
>```
111-
>$ sudo apt-get update -y
112-
>```
113-
> then install `virtualenv` by running the command:
114-
>```
115-
>$ sudo apt-get install -y virtualenv
116-
>```
117-
118-
> After this you can create the `virtualenv` run the command:
119-
>```
120-
>$ virtualenv -p python myvenv
121-
>```
122-
> and a new `virtualenv` with the name `myvenv` or whatever name you chose should be created in your `djangogirls` folder.
123-
124-
<!--endsec-->
125-
126107
127108
## Working with virtualenv
128109
@@ -179,15 +160,6 @@ Remember to replace `myvenv` with your chosen `virtualenv` name!
179160
180161
<!--endsec-->
181162
182-
<!--sec data-title="Working with virtualenv: RunCode" data-id="virtualenv_runcode"
183-
data-collapse=true ces-->
184-
>Start your virtual environment by running:
185-
>```
186-
>$ . myvenv/bin/activate
187-
>```
188-
189-
<!--endsec-->
190-
191163
You will know that you have `virtualenv` started when you see that the prompt in your console is prefixed with `(myvenv)`.
192164
193165
When working within a virtual environment, `python` will automatically refer to the correct version so you can use `python` instead of `python3`.

en/installation/README.md

Lines changed: 42 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,38 +14,68 @@ If you are attending one of the [Django Girls events](https://djangogirls.org/ev
1414
- 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.
1515

1616
# Installation
17-
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 they are needed. This page gathers all of the installation and sign-up instructions in one place (which is useful for some workshop formats).
17+
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
18+
install various software on your computer and set up some online accounts as needed (if you are using local desktop environment) or instructed on how to create online accounts only (if you are using cloud development). This page gathers all of the installation and sign-up instructions in one place (which is useful for some workshop formats).
1819

19-
<!--sec data-title="Chromebook setup (if you're using one)"
20-
data-id="chromebook_setup" data-collapse=true ces-->
21-
{% include "/chromebook_setup/instructions.md" %}
22-
<!--endsec-->
20+
## Local Installation
21+
We have seperate guides for different operating systems, that is, Windows, Linux and Mac OS X. You will need to follow the guide for your operating system. This will will be a good option if you have internet challenges, especially if the laptop you are using is your own. The software you need may be downloaded beforehand by the organizers and you can install from a USB stick.
22+
23+
## Chromebook Setup
24+
Chromebook setup instructions have also been written separate from the guides for other operating systems. These apply to someone following the tutorial on a Chromebook.
25+
26+
## Cloud Development
27+
In this tutorial, the cloud development platform we will be using will be [RunCode](https://runcode.io/). RunCode is a cloud development environment which people can use without the need to install Python, Django and Visual Studio Code editor locally on their machines. This cloud environment enables anyone to work from any device that has an internet connection, including cellphones, tablets, laptop or desktop.
28+
29+
This removes the need for you to install packages on a borrowed laptop or the need for you to own a laptop to attend the workshop or follow this tutorial from home as you only need to set up three online accounts. This will also save you time required for setting up your development environment. You can always do the [installation](installation/README.md#command-line) later own as a follow-up after finishing the tutorial. However, loading the development enviroment requires good and fast internet for this solution to work for you.
30+
31+
> **Note** There are sections of this tutorial which depend on the platform you are working on. If you follow the local installation steps for Windows, Linux, OS X or Chromebook, you will need to follow instructions for your operating system. If you follow RunCode Cloud Environment setup instructions, then you will need to follow instructions for RunCode development environment. Where no specific instructions are provided for RunCode Cloud Environment, follow the Linux instructions as RunCode runs on Ubuntu Linux.
32+
33+
34+
# RunCode Cloud Development Setup
35+
To set up RunCode Cloud development, follow the instructions below:
2336

2437
<!-- sec data-title="RunCode Cloud Development setup (if you are using cloud development)"
2538
data-id="cloud_development" data-collapse=true ces-->
2639
{% include "/cloud_development_setup/instructions.md" %}
2740
<!--endsec-->
41+
42+
43+
# Chromebook Installation
44+
To set up your Chromebook, follow the instructions below:
45+
46+
<!--sec data-title="Chromebook setup (if you're using one)"
47+
data-id="chromebook_setup" data-collapse=true ces-->
48+
{% include "/chromebook_setup/instructions.md" %}
49+
<!--endsec-->
50+
51+
52+
# OS X, Windows, Linux Installation {#osx-windows-linux}
53+
> __NOTE:__ You can skip right over this section if you have followed [RunCode Cloud Development](cloud_development_setup/README.md) or [ChromeBook](chromebook_setup/README.md) installation steps.
54+
55+
If you are not using RunCode or Chromebook, your experience will be a little different as you need to download and install some software locally as well as set up online accounts.
56+
57+
To install software on your machine, follow the instructions below:
2858

29-
# Brief intro to the command line {#command-line}
59+
## Brief intro to the command line {#intro-command-line}
3060
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:
3161
{% include "/intro_to_command_line/open_instructions.md" %}
3262

33-
# Install Python {#python}
63+
## Install Python {#python}
3464
{% include "/python_installation/instructions.md" %}
3565

36-
# Install a code editor {#code-editor}
66+
## Install a code editor {#code-editor}
3767
{% include "/code_editor/instructions.md" %}
3868

39-
# Set up virtualenv and install Django {#virtualenv}
69+
## Set up virtualenv and install Django {#virtualenv}
4070
{% include "/django_installation/instructions.md" %}
4171

42-
# Install Git {#git}
72+
## Install Git {#git}
4373
{% include "/deploy/install_git.md" %}
4474

45-
# Create a GitHub account {#github-account}
75+
## Create a GitHub account {#github-account}
4676
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).
4777

48-
# Create a PythonAnywhere account {#pythonanywhere-account}
78+
## Create a PythonAnywhere account {#pythonanywhere-account}
4979
{% include "/deploy/signup_pythonanywhere.md" %}
5080

5181

en/intro_to_command_line/open_instructions.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
<!--sec data-title="Opening: Windows" data-id="windows_prompt" data-collapse=true ces-->
32

43
Depending on your version of Windows and your keyboard, one of the following should open a command window (you may have to experiment a bit, but you don't have to try all of these suggestions):
@@ -28,6 +27,8 @@ It's probably under Applications → Accessories → Terminal, or Applications
2827
<!--endsec-->
2928

3029
<!--sec data-title="Opening: RunCode" data-id="runcode_prompt" data-collapse=true ces-->
30+
> **NOTE** If you followed [RunCode setup instructions](../cloud_development_setup/README.md) follow these steps to open command line.
31+
3132
To open the Ubuntu terminal on RunCode, go to Workspaces → New Workspace → Blank. This will open a new Visual Studio Code workspace which has an Ubuntu terminal in the bottom pane.
3233

3334
Altenatively, you can go to Workspaces → New Workspace → Jupyter Lab. This will open a Python prompt which is depicted by `>>>`, you can type `exit()` to get back to the Ubuntu terminal.

en/python_installation/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ Python originated in the late 1980s and its main goal is to be readable by human
1212
1313
> **Note** If you already worked through the [installation steps](../installation/README.md), there's no need to do this again – you can skip straight ahead to the next chapter!
1414
15-
> **Note** If you're using RunCode cloud environment, you do not need to install Python as it is pre-installed on their platform
16-
so you can skip straight ahead to the next chapter!
15+
> **Note** If you're using [RunCode cloud environment](../cloud_development_setup/README.md), you do not need to install Python as it is pre-installed on their platform so you can skip straight ahead to the next chapter!
1716
1817
{% include "/python_installation/instructions.md" %}
1918

0 commit comments

Comments
 (0)