You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> **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).
4
+
5
+
{% include "/cloud_development_setup/instructions.md" %}
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.
2
+
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.
6
+
7
+
## Create a RunCode account
8
+
Go to [RunCode.io](https://runcode.io/) and sign up for a new, free user account. You need to have a
9
+
[Google.com](https://www.google.com/intl/en-GB/gmail/about/) account or [GitHub.com](https://github.com/)
10
+
which you can sign up with.
11
+
12
+
## Create a PythonAnywhere account {#pythonanywhere-account}
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:
Copy file name to clipboardExpand all lines: en/code_editor/README.md
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff 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
8
8
9
9
> **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!
10
10
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.
Copy file name to clipboardExpand all lines: en/django_installation/README.md
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,8 @@
2
2
3
3
> **Note** If you're using a Chromebook, skip this chapter and make sure you follow the [Chromebook Setup](../chromebook_setup/README.md) instructions.
4
4
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
+
5
7
> **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!
6
8
7
9
{% include "/django_installation/instructions.md" %}
Copy file name to clipboardExpand all lines: en/django_installation/instructions.md
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -104,6 +104,7 @@ $ python3 -m venv myvenv
104
104
105
105
<!--endsec-->
106
106
107
+
107
108
## Working with virtualenv
108
109
109
110
The command above will create a directory called `myvenv` (or whatever name you chose) that contains our virtual environment (basically a bunch of directories and files).
Copy file name to clipboardExpand all lines: en/installation/README.md
+36-8Lines changed: 36 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -14,33 +14,61 @@ If you are attending one of the [Django Girls events](https://djangogirls.org/ev
14
14
- 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.
15
15
16
16
# 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).
19
+
20
+
# Cloud Development
21
+
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.
22
+
23
+
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.
24
+
25
+
> **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.
26
+
27
+
28
+
# RunCode Cloud Development Setup
29
+
To set up RunCode Cloud development, follow the instructions below:
30
+
31
+
<!-- sec data-title="RunCode Cloud Development setup (if you are using cloud development)"
# OS X, Windows, Linux Installation {#osx-windows-linux}
46
+
> __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.
47
+
48
+
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.
49
+
50
+
To install software on your machine, follow the instructions below:
51
+
52
+
## Brief intro to the command line {#intro-command-line}
25
53
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:
26
54
{% include "/intro_to_command_line/open_instructions.md" %}
27
55
28
-
# Install Python {#python}
56
+
##Install Python {#python}
29
57
{% include "/python_installation/instructions.md" %}
30
58
31
-
# Install a code editor {#code-editor}
59
+
##Install a code editor {#code-editor}
32
60
{% include "/code_editor/instructions.md" %}
33
61
34
-
# Set up virtualenv and install Django {#virtualenv}
62
+
##Set up virtualenv and install Django {#virtualenv}
35
63
{% include "/django_installation/instructions.md" %}
36
64
37
-
# Install Git {#git}
65
+
##Install Git {#git}
38
66
{% include "/deploy/install_git.md" %}
39
67
40
-
# Create a GitHub account {#github-account}
68
+
##Create a GitHub account {#github-account}
41
69
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).
42
70
43
-
# Create a PythonAnywhere account {#pythonanywhere-account}
71
+
##Create a PythonAnywhere account {#pythonanywhere-account}
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):
@@ -26,3 +25,14 @@ Go to Applications → Utilities → Terminal.
26
25
It's probably under Applications → Accessories → Terminal, or Applications → System → Terminal, but that may depend on your system. If it's not there, you can try to Google it. :)
> **NOTE** If you followed [RunCode setup instructions](../cloud_development_setup/README.md) follow these steps to open command line.
31
+
32
+
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.
33
+
34
+
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.
35
+
36
+
Ubuntu is a version of Linux so from now on you can follow Linux instructions.
Copy file name to clipboardExpand all lines: en/python_installation/README.md
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -12,5 +12,7 @@ Python originated in the late 1980s and its main goal is to be readable by human
12
12
13
13
> **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!
14
14
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!
16
+
15
17
{% include "/python_installation/instructions.md" %}
To open the Python terminal on RunCode, go to Workspaces → New Workspace → Jupyter Lab. This will open a Python prompt
22
+
which is depicted by `>>>`. If you already opened an Ubuntu terminal open, in the [Intro to Command Line](../intro_to_command_line/README.md) chapter, you can just type `python3` in the prompt as shown below to open a Python prompt.
0 commit comments