Skip to content

Commit c388502

Browse files
committed
Fix conflicts
2 parents dd6ec47 + 1b4d2f5 commit c388502

File tree

8 files changed

+104
-1
lines changed

8 files changed

+104
-1
lines changed

en/chromebook_setup/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Chromebook setup
2+
3+
> **Note** If you already worked through the Installation steps, no need to do this again - you can skip straight ahead to [Introduction to Python](../python_introduction/README.md).
4+
5+
{% include "/chromebook_setup/instructions.md" %}
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
You can skip right over this section if you're not using a Chromebook. If you
2+
are, your installation experience will be a little different. You can ignore the
3+
rest of the installation instructions.
4+
5+
### Cloud 9
6+
7+
Cloud 9 is a tool that gives you a code editor and access to a computer running
8+
on the internet where you can install, write, and run software. For the duration
9+
of the tutorial, Cloud 9 will act as your _local machine_. You'll still be
10+
running commands in a terminal interface just like your classmates on OS X,
11+
Ubuntu, or Windows, but your terminal will be connected to a computer running
12+
somewhere else that Cloud 9 sets up for you.
13+
14+
1. Install Cloud 9 from the [Chrome web store](https://chrome.google.com/webstore/detail/cloud9/nbdmccoknlfggadpfkmcpnamfnbkmkcp)
15+
2. Go to [c9.io](https://c9.io)
16+
3. Sign up for an account
17+
4. Click _Create a New Workspace_
18+
5. Name it _django-girls_
19+
6. Select the _Blank_ (second from the right on the bottom row with orange logo)
20+
21+
Now you should see an interface with a sidebar, a big main window with some
22+
text, and a small window at the bottom that looks something like:
23+
24+
yourusername:~/workspace $
25+
26+
This bottom area is your _terminal_, where you will give the computer Cloud 9
27+
has prepared for you instructions. You can resize that window to make it a bit
28+
bigger.
29+
30+
### Virtual Environment
31+
32+
A virtual environment (also called a virtualenv) is like a private box we can
33+
stuff useful computer code into for a project we're working on. We use them to
34+
keep the various bits of code we want for our various projects separate so
35+
things don't get mixed up between projects.
36+
37+
In your terminal at the bottom of the Cloud 9 interface, run the following:
38+
39+
sudo apt install python3.4-venv
40+
41+
**If you get an error** like
42+
43+
E: Unable to locate package python3-venv
44+
45+
then instead run:
46+
47+
sudo apt install python3.5-venv
48+
49+
If this still doesn't work, ask your coach for some help.
50+
51+
Next, run:
52+
53+
mkdir djangogirls
54+
cd djangogirls
55+
python3 -mvenv myvenv
56+
source myvenv/bin/activate
57+
pip install django==1.9.6
58+
59+
### Github
60+
61+
Make a [Github](https://github.com) account.
62+
63+
### PythonAnywhere
64+
65+
The Django Girls tutorial includes a section on what is called Deployment,
66+
which is the process of taking the code that powers your new web application
67+
and moving it to a publicly accessible computer (called a server) so other
68+
people can see your work.
69+
70+
This part is a little odd when doing the tutorial on a Chromebook since we're
71+
already using a computer that is on the internet (as opposed to, say, a laptop).
72+
However, it's still useful, as we can think of our Cloud 9 workspace as a place
73+
or our "in progress" work and Python Anywhere as a place to show off our stuff
74+
as it becomes more complete.
75+
76+
Thus, sign up for a new Python Anywhere account at
77+
[www.pythonanywhere.com](http://www.pythonanywhere.com).
78+

en/code_editor/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
55
You're about to write your first line of code, so it's time to download a code editor!
66

7+
> **Note** If you're using a Chromebook, skip this chapter and make sure you follow the [Chromebook Setup](../chromebook_setup/README.md) instructions.
8+
79
> **Note** You might have done this earlier in the Installation chapter – if so, you can skip right ahead to the next chapter!
810
911
{% include "/code_editor/instructions.md" %}

en/css/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ Add this to your CSS, save the file and see how it works!
149149
Maybe we can customize the font in our header? Paste this into your `<head>` in `blog/templates/blog/post_list.html` file:
150150

151151
```html
152-
<link href="https://fonts.googleapis.com/css?family=Lobster&subset=latin,latin-ext" rel="stylesheet" type="text/css">
152+
<link href="//fonts.googleapis.com/css?family=Lobster&subset=latin,latin-ext" rel="stylesheet" type="text/css">
153153
```
154154

155155
This line will import a font called *Lobster* from Google Fonts (https://www.google.com/fonts).

en/django_installation/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Django installation
22

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+
35
> **Note** If you already worked through the Installation steps then you've already done this - you can go straight to the next chapter!
46
57
{% include "/django_installation/instructions.md" %}

en/django_start_project/README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ STATIC_URL = '/static/'
7272
STATIC_ROOT = os.path.join(BASE_DIR, 'static')
7373
```
7474

75+
> **Note**: If you're using a Chromebook, add this line at the bottom of your settings.py file:
76+
> `MESSAGE_STORAGE = 'django.contrib.messages.storage.session.SessionStorage'`
7577
7678
## Setup a database
7779

@@ -115,6 +117,11 @@ You need to be in the directory that contains the `manage.py` file (the `djangog
115117

116118
(myvenv) ~/djangogirls$ python manage.py runserver
117119

120+
If you are on a Chromebook, use this command instead:
121+
122+
(myvenv) ~/djangogirls$ python manage.py runserver 0.0.0.0:8080
123+
124+
118125
If you are on Windows and this fails with `UnicodeDecodeError`, use this command instead:
119126

120127
(myvenv) ~/djangogirls$ python manage.py runserver 0:8000
@@ -124,6 +131,10 @@ Now all you need to do is check that your website is running. Open your browser
124131

125132
http://127.0.0.1:8000/
126133

134+
If you're using a Chromebook, you'll always visit your test server by accessing:
135+
136+
https://django-girls-<your cloud9 username>.c9users.io
137+
127138
The web server will take over your command prompt until you stop it. To type more commands whilst it is running open a new terminal window and activate your virtualenv. To stop the web server, switch back to the window in which it's running and pressing CTRL+C - Control and C buttons together (on Windows, you might have to press Ctrl+Break).
128139

129140
Congratulations! You've just created your first website and run it using a web server! Isn't that awesome?

en/installation/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ Good luck!
1111
# Installation
1212
In the workshop you will be building a blog, and there are a few setup tasks in the tutorial which would be good to work through beforehand so that you are ready to start coding on the day.
1313

14+
# Chromebook setup (if you're using one)
15+
{% include "/chromebook_setup/instructions.md" %}
16+
1417
# Install Python
1518
{% include "/python_installation/instructions.md" %}
1619

en/python_installation/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ Python originated in the late 1980s and its main goal is to be readable by human
88

99
# Python installation
1010

11+
> **Note** If you're using a Chromebook, skip this chapter and make sure you follow the [Chromebook Setup](../chromebook_setup/README.md) instructions.
12+
1113
> **Note** If you already worked through the Installation steps, there's no need to do this again – you can skip straight ahead to the next chapter!
1214
1315
{% include "/python_installation/instructions.md" %}

0 commit comments

Comments
 (0)