Skip to content

Commit

Permalink
Minor typos in chapters 0 - 12
Browse files Browse the repository at this point in the history
  • Loading branch information
olasitarska committed Aug 9, 2014
1 parent bfcc0d8 commit a0b1cb6
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 26 deletions.
2 changes: 1 addition & 1 deletion code_editor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

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

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 more simple.
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.

Expand Down
6 changes: 3 additions & 3 deletions django_installation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

> Part of this chapter is based on tutorials by Geek Girls Carrots (http://django.carrots.pl/).
> Parts of this chapter is based on the [django-marcador
> Part of this chapter is based on the [django-marcador
tutorial](http://django-marcador.keimlink.de/) licensed under Creative Commons
Attribution-ShareAlike 4.0 International License. The django-marcador tutorial
is copyrighted by Markus Zapke-Gründemann et al.
Expand All @@ -27,7 +27,7 @@ We will make a virtualenv called `myvenv`. The general command will be in the fo

### Windows

To create a new `virtualenv`, you need to open the console (we told you about that a few tutorials ago - remember?) and run `C:\Python\python -m venv venv`. It will look like this:
To create a new `virtualenv`, you need to open the console (we told you about that a few chapters ago - remember?) and run `C:\Python\python -m venv venv`. It will look like this:

C:\Users\Name\djangogirls> C:\Python34\python -m venv myvenv

Expand All @@ -40,7 +40,7 @@ It will look like this:

~/djangogirls$ python3 -m venv myvenv

and just like the Windows instructions above, `myvenv` is the name of your `virtualenv`. You can use any other name, but stick to lowercase and use no spaces. It is also good idea to keep the name short - you'll be referencing it a lot!
`myvenv` is the name of your `virtualenv`. You can use any other name, but stick to lowercase and use no spaces. It is also good idea to keep the name short - you'll be referencing it a lot!

> __NOTE:__ Initiating the virtual environment on Ubuntu 14.04 like this currently gives the following error:
Expand Down
11 changes: 5 additions & 6 deletions django_models/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@ What kind of things could be done with a blog post? It would be nice to have som

So we will need `publish` method.

Since we already know what we want to achieve, we can start modelling it in Django!
Since we already know what we want to achieve, we can start modeling it in Django!

## Django model

Knowing what an object is, we can create a Django model for our blog post.

A model in Django is a special kind of object - it is saved in the `database` (database we created in the __Database__ chapter).
A model in Django is a special kind of object - it is saved in the `database`. You can think of model in a database as of a spreadsheet with columns and rows.

### Creating an application

Expand All @@ -77,7 +77,7 @@ You will notice that a new `blog` directory is created and it contains a number
tests.py
views.py

After creating an application we also need to tell Django that it should use it. We do that in the file `mysite/settings.py`. We need to find `INSTALLED_APPS` and add a line `blog` just above `)`. We should also add the `mysite` application (which was created for us when we started a new project in the last chapter). So the final product should look like this:
After creating an application we also need to tell Django that it should use it. We do that in the file `mysite/settings.py`. We need to find `INSTALLED_APPS` and add a line `blog` just above `)`. So the final product should look like this:

INSTALLED_APPS = (
'django.contrib.admin',
Expand All @@ -87,12 +87,11 @@ After creating an application we also need to tell Django that it should use it.
'django.contrib.messages',
'django.contrib.staticfiles',
'blog',
'mysite',
)

### Creating a blog post model

In the `models.py` file we define all objects called `Models` - this is a place in which we will define our blog post.
In the `blog/models.py` file we define all objects called `Models` - this is a place in which we will define our blog post.

Let's open `blog/models.py`, remove everything from it and write code like this:

Expand Down Expand Up @@ -120,7 +119,7 @@ It is scary, right? But no worries, we will explain what these lines mean!

All lines starting with `from` or `import` are lines that add some bits from other files. So instead of copying and pasting the same things in every file, we can include some parts with `from ... import ...`.

`class Post(models.Model):` - this line defines our model (it is an `object`!).
`class Post(models.Model):` - this line defines our model (it is an `object`).

- `class` is a special keyword that indicates that we are defining an object.
- `Post` is the name of our model, we can give it a different name (but we must avoid special characters and whitespaces). Always start a name with an uppercase letter.
Expand Down
2 changes: 0 additions & 2 deletions django_start_project/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,6 @@ You should find lines that contain `USE_TZ` and `TIME_ZONE` and modify them to l
USE_TZ = False
TIME_ZONE = 'Europe/Berlin'

(But with the correct country and city for your timezone.)

## Setup a database

There's a lot of different database software that can store data for your site. We'll use the default one, `sqlite3`.
Expand Down
11 changes: 6 additions & 5 deletions django_urls/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

We're about to build our first webpage -- a homepage for your blog! But first, let's learn a little bit about Django urls.

## What is a URL?
## What is an URL?

A URL is simply like a web address, you can see a URL every time you visit any website - it is visible in your browser's address bar (yes! `127.0.0.1:8000` is a URL! And http://djangogirls.com is also a URL):
An URL is simply a web address, you can see a URL every time you visit any website - it is visible in your browser's address bar (yes! `127.0.0.1:8000` is a URL! And http://djangogirls.com is also a URL):

![Url](images/url.png)

Expand All @@ -29,7 +29,7 @@ Let's open up the `mysite/urls.py` file and see what it looks like:

As you can see, Django already put something here for us.

Lines that start with `#` are comments - it means that those lines won't be executed by Python. Pretty handy, right?
Lines that start with `#` are comments - it means that those lines won't be run by Python. Pretty handy, right?

The admin URL, which you visited in previous chapter is already here:

Expand All @@ -43,9 +43,10 @@ Do you wonder how Django matches URLs to views? Well, this part is tricky. Djang

## Your first Django url!

Time to create our first urls! We want http://127.0.0.1:8000/ to be a homepage of our blog and display a list of posts.
Time to create our first URL! We want http://127.0.0.1:8000/ to be a homepage of our blog and display a list of posts.

We also want to keep the `mysite/urls.py` file clean, so we will import urls from our `blog` application to the main `mysite/urls.py` file.

Go ahead, delete the commented lines (lines starting with `#`) and add a line that will import `blog.urls` into the main url (`''`).

Your `mysite/urls.py` file should now look like this:
Expand Down Expand Up @@ -77,7 +78,7 @@ After that, we can add our first URL pattern:
url(r'^$', views.post_list),
)

As you can see, we're now assigning a `view` called `post_list` to `^$` URL. But what does `^$` mean? It's regex magic :) Let's break it down:
As you can see, we're now assigning a `view` called `post_list` to `^$` URL. But what does `^$` mean? It's a regex magic :) Let's break it down:
- `^` in regex means "the beginning"; from this sign we can start looking for our pattern
- `$` matches only "the end" of the string, which means that we will finish looking for our pattern here

Expand Down
2 changes: 1 addition & 1 deletion how_internet_works/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@ So, basically, when you have a website you need to have a *server* (machine) whe

Since this is a Django tutorial, you will ask what Django does. When you send a response, you don't always want to send the same thing to everybody. It is so much better if your letters are personalized, especially for the person that has just written to you, right? Django helps you with creating these personalized, interesting letters :).

Enough talk, time to create! But first the boring part - installation!
Enough talk, time to create!
6 changes: 1 addition & 5 deletions intro_to_command_line/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Introduction to Command Line

## What is command line?

## Introduction
The following steps will show you how to use the black window all hackers use. It might look a bit scary at first, but really, it is just a prompt, waiting for commands from you.

The window, which is usually called the *command line*, is a text-based application for viewing, handling and manipulating files on your computer (much like e.g. Windows Explorer or Finder on Mac, but without the graphical interface). Other names for the command line are: *cmd*, *prompt*, *console* or *terminal*.
Expand All @@ -18,7 +18,6 @@ Each operating system has a slightly different set of commands for the command l
| mkdir | mkdir | create a new directory | **mkdir testdirectory** |
|del | rm | delete a directory/file | **del c:\test\test.txt**


These are just a very few of the commands you can run in your command line. To learn more about them, check out the **Further Information** section below.

[ss64.com](http://ss64.com) contains a complete reference of commands for all operating systems.
Expand All @@ -27,15 +26,12 @@ These are just a very few of the commands you can run in your command line. To l

* **Up arrow** - rerun previous commands. You can avoid typing the same commands again and again by using the up arrow key to cycle through recently used commands.


* **Tab key** - the tab key autocompletes directory and file names. For example, if you type `dir t` and then use `TAB`, the command line will try to match this to existing files in your current directory and autocomplete the name for you. Meaning, if your directory contains a file called `test.txt`, typing `dir t` and `TAB` will autocomplete to `dir test.txt`.


## Further information on some of the above commands

* **exit** - closes your command prompt. This makes sense, right? No need to explain too much...


* **cd** - allows you to go to another directory. To go to a directory contained within your current directory, type `cd subdirectory` (where you replace subdirectory with the name of the directory you want to go to) and press enter.

**For example:** let's say you are in a directory called `c:\test` with three sub-directories: `documents`, `photos` and `music`.
Expand Down
5 changes: 2 additions & 3 deletions python_installation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ Python originated in the late 1980s and its main goal is to be readable by human

# Python installation

> This subchapter is based on awesome tutorials by Geek Girls Carrots (http://django.carrots.pl/)
> This subchapter is based on tutorial by Geek Girls Carrots (http://django.carrots.pl/)
Django is written in Python. We need Python to do anything in Django. Let's start with installing it! We want you to install Python 3.4, so if you have any earlier version, you will need to upgrade it.

### Windows

You can download Python for Windows from the website https://www.python.org/download/releases/3.4.1/. After downloading the ***.msi** file, you should execute it (double-click on it) and follow the instructions there. It is important to remember the path (the directory) where you installed Python. It will be needed later!
You can download Python for Windows from the website https://www.python.org/download/releases/3.4.1/. After downloading the ***.msi** file, you should run it (double-click on it) and follow the instructions there. It is important to remember the path (the directory) where you installed Python. It will be needed later!

### Linux

Expand All @@ -31,7 +31,6 @@ Type this command into your console:

sudo apt-get install python3.4


#### Fedora

Use this command in your console:
Expand Down

0 comments on commit a0b1cb6

Please sign in to comment.