Skip to content

Commit 5de9cac

Browse files
committed
Textual changes. "I" -> "we". More explanations and more info to avoid some problems.
1 parent 80612f9 commit 5de9cac

3 files changed

Lines changed: 37 additions & 32 deletions

File tree

database/README.md

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Database
22

3-
Most of web application have their own database. A database is a collection of data. This is a place in which you will store all information about users, all your blog post texts, etc..
3+
Most of web applications have their own database. A database is a collection of data. This is a place in which you will store all information about users, all your blog post texts, etc..
44

5-
We will be using a PostgreSQL database to store our data. It would be easier to just use a default Django database called sqlite, but it's not good for a production use. If you want to have your application available in the Internet, not only your computer, you will need PostgreSQL.
5+
We will be using a PostgreSQL database to store our data. It would be easier to use a default Django database called *sqlite*, but it's not good for a production use (by *production* we mean: real, running websites). If you want to have your application available in the Internet, not only on your computer, you will need PostgreSQL.
66

77
# PostgreSQL installation
88

@@ -24,7 +24,7 @@ Of course, installation depends on Linux distribution. We've added most popular
2424

2525
### Ubuntu
2626

27-
Go to your console and run following command:
27+
Go to your console and run a following command:
2828

2929
sudo apt-get install postgresql postgresql-contrib
3030

@@ -34,9 +34,10 @@ Go to your console and run following command:
3434

3535
# Create database
3636

37-
Now we need to create our database user and our first database!
37+
Now we need to create our database user and our first database. You can add many databases in PostgreSQL, so if you have more than one website, you should have a separate database for each one!
3838

39-
First, let's make our console into postgres mode:
39+
First, let's make our console into postgres mode by typing `psql`. Remember the part about console?
40+
>On Mac OS X you can do this by launching the `Terminal` application (it's in Applications → Utilities). On Windows you need to go to Start menu → All Programs → Accessories → Command Prompt. On Linux, it's probably under Applications → Accessories → Terminal.
4041
4142
$ psql
4243
psql (9.3.4)
@@ -48,11 +49,15 @@ Our `$` now changed into `#`, it means that we're now giving commands to Postgre
4849
# CREATE USER name;
4950
CREATE ROLE
5051

51-
Of course, replace `name` with your own name. Now it's time for a database for your Django project:
52+
Of course, replace `name` with your own name. Remember that you should not use diacritic letters and whitespaces, i.e. `bożena maria` is invalid! You need to transform it into `bozena_maria`.
53+
54+
Now it's time to create a database for your Django project:
5255

5356
# CREATE DATABASE djangogirls OWNER name;
5457
CREATE DATABASE
5558

56-
Awesome! All ready.
59+
Remember to replace `name` with the name you've chosen (i.e. `bozena_maria`).
60+
61+
Awesome! All ready!
5762

5863

django/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,23 @@ Django (_/ˈdʒæŋɡoʊ/ jang-goh_) is a free and open source web application f
44

55
You see, when you're building a website, you always need a similiar set of components: a way to handle user authentication (signing up, signing in, signing out), management panel for your website, forms, uploading files, etc.
66

7-
Luckily for you other people long ago noticed that web developers face similar problems when building a new site, so they teamed up and created frameworks (Django is one of them) that gives you ready components you can use.
7+
Luckily for you other people long ago noticed that web developers face similar problems when building a new site, so they teamed up and created frameworks (Django is one of them) that give you ready components you can use.
88

99
Frameworks exist to save you from having to re-invent the wheel and help alleviate some of the overhead when you’re building a new site.
1010

1111
## Why do you need a framework?
1212

1313
To understand what Django actually is for, we need a closer look at the servers. First thing is that the server needs to know that you want it to serve you a webpage.
1414

15-
Imagine a mailbox (port) which is monitored for incoming letters (requests). It is done by a web server. The web server also sends the response with a webpage. But when you want to send something, you need to have some content. And Django is something that helps you create the content.
15+
Imagine a mailbox (port) which is monitored for incoming letters (requests). It is done by a web server. The web server also sends a response with a webpage. But when you want to send something, you need to have some content. And Django is something that helps you create the content.
1616

17-
## What happen when someone request a website from your server?
17+
## What happen when someone requests a website from your server?
1818

19-
When a request comes to a web server it's passed to Django which tries to figure out what actually is requested. It takes a webpage address used and tries to figure out what to do. This part is done by Django's urlresolver (Note that a website address is called URL - Uniform Resource Locator, so the name 'urlresolver' makes sense). It is not very smart here - it takes a list of patterns and tries to match the URL. Django checks patterns from top to the bottom and if something is matched then Django passes the request to the associated function called view.
19+
When a request comes to a web server it's passed to Django which tries to figure out what actually is requested. It takes a webpage address first and tries to figure out what to do. This part is done by Django's urlresolver (Note that a website address is called URL - Uniform Resource Locator, so the name *urlresolver* makes sense). It is not very smart - it takes a list of patterns and tries to match the URL. Django checks patterns from top to the bottom and if something is matched then Django passes the request to the associated function (which is called *view*).
2020

21-
Imagine a postman with a letter who is walking down the street and checks each house number with the one on the letter. If it matches, they put the letter there.
21+
Imagine a postman with a letter. She is walking down the street and checks each house number with the one on the letter. If it matches, they put the letter there. This is how the urlresolver works!
2222

23-
In the 'view' all interesting things are done: we can look at the database to look for some information to return it to the user. Maybe the user asked to change something in the data? Like a letter saying "Please change description of my job title." - the view can check if you are allowed to do that, then update the job title for you and send back a message: "Done!". Then the view generates a response and Django can send it to the user's web browser.
23+
In the *view* function all interesting things are done: we can look at a database to look for some information. Maybe the user asked to change something in the data? Like a letter saying "Please change description of my job." - the *view* can check if you are allowed to do that, then update the job description for you and send back a message: "Done!". Then the *view* generates a response and Django can send it to the user's web browser.
2424

2525
Of course, the description above is a little bit simplified, but you don't need to know all the technical things yet. Knowing a general idea is enough.
2626

python_introduction/README.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Nice! See how the answer popped out? Python knows math! You could try other comm
2929
- `5 - 1`
3030
- `40 / 2`
3131

32-
Have fun with this for a little while and then get back here :)
32+
Have fun with this for a little while and then get back here :).
3333

3434
As you can see, Python is a great calculator. If you're wondering what else you can do...
3535

@@ -74,18 +74,18 @@ Ok, enough of strings. So far you've learned about:
7474
- __numbers and strings__ - in Python it's math and text objects
7575
- __methods__ - are actions in Python. You've used both English-language methods (upper, len) and symbolic ones (+, *).
7676

77-
That's the basic of every programming language you learn. Ready for something harder? I bet you are!
77+
That's the basic of every programming language you learn. Ready for something harder? We bet you are!
7878

7979
## Errors
8080

81-
Let's try something. Can we know the length of a number, the same way we learn about the length of our name? Try typing `len(304023)` and hit Enter:
81+
Let's try something. Can we get a length of a number, the same way we learn about the length of our name? Try typing `len(304023)` and hit Enter:
8282

8383
>>> len(304023)
8484
Traceback (most recent call last):
8585
File "<stdin>", line 1, in <module>
8686
TypeError: object of type 'int' has no len()
8787

88-
We got our first error! It says that objects of type "int" (integers, whole numbers) don't have a length. So what can we do now? Maybe we can write our number as string? Strings have length, right?
88+
We got our first error! It says that objects of type "int" (integers, whole numbers) don't have a length. So what can we do now? Maybe we can write our number as a string? Strings have length, right?
8989

9090
>>> len(str(304023))
9191
6
@@ -112,7 +112,7 @@ As you've noticed, your program didn't return anything like it did before. How d
112112
>>> name
113113
'Ola'
114114

115-
Yikes! Your first variable :) You can always change what it is:
115+
Yikes! Your first variable :)! You can always change what it is:
116116

117117
>>> name = "Sonja"
118118
>>> name
@@ -134,7 +134,7 @@ Play with this for a while and see what you can do!
134134

135135
## Lists
136136

137-
Beside strings and integers, Python has all sorts of different types of objects. Now we're going to introduce another one called __lists__. List is the exact thing you think about now: object that is a list of objects :)
137+
Beside strings and integers, Python has all sorts of different types of objects. Now we're going to introduce one called __list__. List is the exact thing you think about now: object that is a list of objects :)
138138

139139
Go ahead and create a list:
140140

@@ -145,7 +145,7 @@ Yes, it's empty. Not very useful, right? Let's create a list of lottery numbers.
145145

146146
>>> lottery = [3, 42, 12, 19, 30, 59]
147147

148-
All right, we have a list! What can we do with it? Let's see how many lottery numbers there is in a list. Do you have an idea which method you should use for that? You know this already!
148+
All right, we have a list! What can we do with it? Let's see how many lottery numbers there are in a list. Do you have an idea which method you should use for that? You know this already!
149149

150150
>>> len(lottery)
151151
6
@@ -167,13 +167,13 @@ Maybe we want to reverse the order? Let's do that!
167167
>>> print(lottery)
168168
[59, 42, 30, 19, 12, 3]
169169

170-
It worked! If you want to add something to the list, you can do this by typing this command:
170+
Easy, right? If you want to add something to the list, you can do this by typing this command:
171171

172172
>>> lottery.append(199)
173173
>>> print(lottery)
174174
[59, 42, 30, 19, 12, 3, 199]
175175

176-
If you want to only read the first number, you can do this by using index. The first objects of list is an object number 0, next one is 1, and so on. Try this:
176+
If you want to read only the first number, you can do this by using index. The first object of the list is an object number 0, next one is 1, and so on. Try this:
177177

178178
>>> print(lottery[0])
179179
59
@@ -268,7 +268,7 @@ Practice and have fun with Boolean by trying to run following commands:
268268
- `True or 1 == 1`
269269
- `1 != 2`
270270

271-
Congrats! You can know move on to the essence of programming:
271+
Congrats! You can now move on to the essence of programming:
272272

273273
## If...elif...else
274274

@@ -288,7 +288,7 @@ So far nothing has happened, as evidenced by dots `...` instead of incentives `>
288288
^
289289
IndentationError: expected an indented block
290290

291-
Well...something went wrong. Python needs to know whether the instruction we have written is a continuation of `if` or it is the next instruction not covered by the condition. To this purpose we need to indent our code:
291+
Well...something went wrong! Python needs to know whether the instruction we have written is a continuation of `if` or it is the next instruction not covered by the condition. We need to indent our code to make it work:
292292

293293
>>> if 3 > 2:
294294
... print('It works!')
@@ -343,14 +343,14 @@ Time for the last part of this chapter!
343343

344344
## Methods (functions)
345345

346-
Remember about methods like `len` that you can execute in Python? Well, good news, you will learn how to write you own functions now!
346+
Remember about methods like `len` that you can execute in Python? Well, good news, you will learn how to write your own functions now!
347347

348348
A function is a set of instructions that Python should execute. Each function in Python starts with the keyword `def`, has a name and can have some parameters. Let's start with an easy one:
349349

350350
>>> def hi():
351351
...
352352

353-
As you can see, there are the dots again! This means that nothing has really happenned yet.. and yes, we need to do a `TAB` before giving our instructions:
353+
As you can see, there are the dots again! This means that nothing has really happenned yet... and yes, we need to do a `TAB` before giving our instructions:
354354

355355
>>> def hi():
356356
... print('Hi there!')
@@ -363,9 +363,9 @@ Ok, our first function is ready! Let's execute it:
363363
Hi there!
364364
How are you?
365365

366-
Great! You're now a programmer, congratulate yourself :)
366+
Great! You're now a programmer, congratulate yourself :)!
367367

368-
That was easy, so let's build our first function with parameters. We will use previous example with names:
368+
That was easy! Let's build our first function with parameters. We will use the previous example with names:
369369

370370
>>> def hi(name):
371371
...
@@ -403,19 +403,19 @@ Let's call the function now:
403403
>>> hi("Rachel")
404404
Hi Rachel!
405405

406-
Congrats! :)
406+
Congratulations! You just learned how to write functions :)!
407407

408408
## Loops
409409

410410
That's the last part already. That was quick, right?:)
411411

412-
As we mentioned, programmers are lazy, they don't like to repeat themselves. Programming is all about automating things, so we don't want to greet every girl by their name manually, right? That's where loops come handy.
412+
As we mentioned, programmers are lazy, they don't like to repeat themselves. Programming is all about automating things, so we don't want to greet every girl by their name manually, right? That's where loops come in handy.
413413

414414
Remember lists yet? Let's do a list of all the girls:
415415

416416
>>> girls = ['Rachel', 'Monica', 'Phoebe', 'Ola', 'You']
417417

418-
We want to greet all of them by they name. We have `hi` function to do that, so let's use it in a loop:
418+
We want to greet all of them by their name. We have `hi` function to do that, so let's use it in a loop:
419419

420420
>>> for name in girls:
421421
...
@@ -453,7 +453,7 @@ You can also do `for` on numbers using `range` method:
453453

454454
## Summary
455455

456-
That's it. __You totally rock!__ It really wasn't so easy, so you should feel proud about yourself. We're definitely proud of you for making it here!
456+
That's it. __You totally rock!__ It really wasn't so easy, so you should feel proud of yourself. We're definitely proud of you for making it here!
457457

458458
Grab yourself a cupcake and go to the next chapter :)
459459

0 commit comments

Comments
 (0)