Skip to content

Commit

Permalink
Merge pull request #81 from BluesFiend/hotfix/directory_consitency
Browse files Browse the repository at this point in the history
folder/directory consitency
  • Loading branch information
oinopion committed Jul 27, 2014
2 parents 67f3dd6 + 775885e commit fe652e8
Show file tree
Hide file tree
Showing 12 changed files with 28 additions and 24 deletions.
4 changes: 2 additions & 2 deletions css/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ CSS is a static file, so in order to customize CSS, we need to first configure s

### Configure static files in Django

First, we need to create a folder to store our static files in. Go ahead and create a folder called `static` inside your `djangogirls` folder.
First, we need to create a directory to store our static files in. Go ahead and create a directory called `static` inside your `djangogirls` directory.

static
manage.py
Expand All @@ -52,7 +52,7 @@ This way Django will know where to find your static files.

## Your first CSS file!

Let's create a CSS file now, to add your own style to your web-page. Create a new folder called `css` inside your `static` folder. Then create a new file called `blog.css` inside this `css` directory. Ready?
Let's create a CSS file now, to add your own style to your web-page. Create a new directory called `css` inside your `static` directory. Then create a new file called `blog.css` inside this `css` directory. Ready?

static
└───css
Expand Down
2 changes: 1 addition & 1 deletion django_forms/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This is exactly what we want to do: we will create a form for our `Post` model.

Like every important part of Django, forms have their own file: `forms.py`.

We need to create a file with this name in the `blog` folder.
We need to create a file with this name in the `blog` directory.

blog
└── forms.py
Expand Down
6 changes: 3 additions & 3 deletions django_installation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Before we install Django, we'll get you to install an extremely useful tool that

So, let's create a **virtual environment** (also called a *virtualenv*). It will isolate your Python/Django setup on a per-project basis, meaning that any changes you make to one website won't affect any others you're also developing. Neat, right?

All you need to do is find a folder 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).
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).

For this tutorial we will be using a new directory `djangogirls` from your home directory:

Expand All @@ -30,7 +30,7 @@ To create a new `virtualenv`, you need to open the console (we told you about th

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

where `C:\Python34\python` is the folder in which you previously installed Python and `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!
where `C:\Python34\python` is the directory in which you previously installed Python and `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!

### Linux and OS X

Expand All @@ -51,7 +51,7 @@ Creating a `virtualenv` on both Linux and OS X is as simple as running:

## Working with virtualenv

The command above will create a folder called `myvenv` that contains our virtual environment (basically bunch of folders and files). All we want to do now is starting it by running:
The command above will create a directory called `myvenv` that contains our virtual environment (basically bunch of directory and files). All we want to do now is starting it by running:

C:\Users\Name\djangogirls> myvenv\Scripts\activate

Expand Down
4 changes: 2 additions & 2 deletions django_models/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@ A model in Django is a special kind of object - it is saved in the `database` (d

### Creating an application

To keep everything tidy, we will create a separate application inside our project. It is very nice to have everything organized from the very beginning. To create an application we need to run in the console (from `djangogirls` folder where `manage.py` file is) `python manage.py startapp blog`.
To keep everything tidy, we will create a separate application inside our project. It is very nice to have everything organized from the very beginning. To create an application we need to run in the console (from `djangogirls` directory where `manage.py` file is) `python manage.py startapp blog`.

(myvenv) ~/djangogirls$ python manage.py startapp blog

You will notice that a new `blog` folder is created and it contains a number of files now. Our folders and files in our project should look like this:
You will notice that a new `blog` directory is created and it contains a number of files now. Our directories and files in our project should look like this:

mysite
├── __init__.py
Expand Down
2 changes: 1 addition & 1 deletion django_orm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Remember when we talked about including code written in different files? Now is
from django.shortcuts import render
from .models import Post

Dot after `from` means *current folder* or *current application*. Since `views.py` and `models.py` are in the same directory we can simply use `.` and the name of the file (without `.py`). Then we import the name of the model (`Post`).
Dot after `from` means *current directory* or *current application*. Since `views.py` and `models.py` are in the same directory we can simply use `.` and the name of the file (without `.py`). Then we import the name of the model (`Post`).

But what's next? To take actual blog posts from `Post` model we need something called a `Queryset`.

Expand Down
6 changes: 3 additions & 3 deletions django_start_project/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ or on Windows:

(myvenv) ~/djangogirls$ python myvenv\Scripts\django-admin.py startproject mysite .

`django-admin.py` is a script that will create the folders and files for you. You should now have a folder structure which looks like this:
`django-admin.py` is a script that will create the directories and files for you. You should now have a directory structure which looks like this:

manage.py
Expand Down Expand Up @@ -66,7 +66,7 @@ This is already set up in this part of your `mysite/settings.py` file:
}
}

To create a database for our blog, let's run the following in the console: `python manage.py syncdb` (we need to be in a parent `mysite` directory that contains `manage.py` file). If that goes well, you should see something like this:
To create a database for our blog, let's run the following in the console: `python manage.py syncdb` (we need to be the `djangogirls` directory that contains the `manage.py` file). If that goes well, you should see something like this:

(myvenv) ~/djangogirls$ python manage.py syncdb
Creating tables ...
Expand Down Expand Up @@ -95,7 +95,7 @@ It will ask you if you want to create a *superuser* - a user which has control o

And we're done! Time to start the web server and see if our website is working!

You need to be in the folder that contains the `manage.py` file (the `mysite` folder). In the console, we can start the web server by running `python manage.py runserver`:
You need to be in the directory that contains the `manage.py` file (the `djangogirls` directory). In the console, we can start the web server by running `python manage.py runserver`:

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

Expand Down
2 changes: 1 addition & 1 deletion extend_your_application/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ We want to have a link to a post detail page on the post's title. Let's change `

Time to explain the mysterious `{% url 'blog.views.post_detail' pk=post.pk %}`. As you suspect `{% %}` notation means that we are using Django template tags. This time we will use one that will create a URL for us!

`blog.views.post_detail` is a path to a `post_detail` *view* we want to create. Please note: `blog` is the name of our application (in folder `blog`), `views` is from the name of the `views.py` file and the last bit: `post_detail` is the name of the *view*.
`blog.views.post_detail` is a path to a `post_detail` *view* we want to create. Please note: `blog` is the name of our application (the directory `blog`), `views` is from the name of the `views.py` file and the last bit: `post_detail` is the name of the *view*.

Now when we go to:

Expand Down
6 changes: 3 additions & 3 deletions html/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ HTML stands for "HyperText Markup Language." __HyperText__ means it's a type of

Creating a template means creating a template file. Everything is a file, right? You have probably noticed this already.

Templates are saved in `blog/templates/blog` folder. So first create a folder called `templates` inside your blog folder. Then create another folder called `blog` inside your templates folder:
Templates are saved in `blog/templates/blog` directory. So first create a directory called `templates` inside your blog directory. Then create another directory called `blog` inside your templates directory:

blog
└───templates
└───blog

(You might wonder why we need two folders both called `blog` - as you will discover later, this is simply a useful naming convention that makes life easier when things start to get more complicated.)
(You might wonder why we need two directories both called `blog` - as you will discover later, this is simply a useful naming convention that makes life easier when things start to get more complicated.)

And now create a `post_list.html` file (just leave it blank for now) inside the `blog/templates/blog` folder.
And now create a `post_list.html` file (just leave it blank for now) inside the `blog/templates/blog` directory.

See how your website looks now: http://127.0.0.1:8000/

Expand Down
14 changes: 9 additions & 5 deletions intro_to_command_line/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ Each operating system has a slightly different set of commands for the command l
| ------------- |-----------|-------------| -----|
| exit | exit | close the window | **exit** |
| cd | cd | change directory | **cd test** |
| dir | ls |list folders/files | **dir** |
| dir | ls |list directories/files | **dir** |
| copy | cp | copy file | **copy c:\test\test.txt c:\windows\test.txt** |
| move | mv | move file | **move c:\test\test.txt c:\windows\test.txt** |
| mkdir | mkdir | create a new folder | **mkdir testfolder** |
|del | rm | delete a folder/file | **del c:\test\test.txt**
| mkdir | mkdir | create a new directory | **mkdir testdirectory** |
|del | rm | delete a directory/file | **del c:\test\test.txt**
To learn more about the above commands, check out the Further Information section below.

These are just a very few of the possible black window commands.
Expand All @@ -27,7 +27,11 @@ These are just a very few of the possible black window commands.
* **Up arrow** - rerun previous commands. You can avoid typing the same commands again by using the up arrow key to rerun recently used commands.


* **Tab key** - the tab key will autocomplete folder and file names. For example, typing `dir t` + `Tab` will autocomplete to all directories starting with `t` in the current directory (such as task, test, tutorial).
<<<<<<< HEAD
* Tab key - the tab key will autocomplete directory and file names. For example, typing **dir t ** + Tab will autocomplete to all directories starting with t in the current directory (such as task, test, tutorial).
=======
* **Tab key** - the tab key will autocomplete directory and file names. For example, typing `dir t` + `Tab` will autocomplete to all directories starting with `t` in the current directory (such as task, test, tutorial).
>>>>>>> upstream/master

## Further information about the commands above
Expand Down Expand Up @@ -62,7 +66,7 @@ Note that for many commands you can use the `*` symbol which stands for *all* or
* **move** (Windows) / **mv** (others) - it allows you to move files from one location to another. The syntax you use is the same as for the `copy` command.


* **mkdir** - it allows you to create a new directory. For example, `mkdir temp` creates a new folder called `temp` in the current directory.
* **mkdir** - it allows you to create a new directory. For example, `mkdir temp` creates a new directory called `temp` in the current directory.


* **del** (Windows) / **rm** (others) - it allows you to delete the specified file. For example, `del test.txt` deletes the `test.txt` file from the current directory.
Expand Down
2 changes: 1 addition & 1 deletion optional_postgresql_installation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Choose the newest version available for your operating system. Download the inst

The easiest way is to download the free [Postgres.app](http://postgresapp.com/) and install it like any other application on your operating system.

Download it, drag to the Applications folder and run by double clicking. That's it!
Download it, drag to the Applications directory and run by double clicking. That's it!

You'll also have to add the Postgres command line tools to your `PATH` variable, what is described [here](http://postgresapp.com/documentation/cli-tools.html).

Expand Down
2 changes: 1 addition & 1 deletion python_installation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Django is written in Python. We need Python to do anything in Django. Let's star

### 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 folder) 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 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!

### Linux

Expand Down
2 changes: 1 addition & 1 deletion template_extending/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This way you don't have to repeat yourself in every file, when you want to use t

A base template is the most basic template that you extend on every page of your website.

Create a `templates/mysite/base.html` file. You also need to create `templates` and `mysite` folders, but you probably have noticed this pattern already :)
Create a `templates/mysite/base.html` file. You also need to create `templates` and `mysite` directories, but you probably have noticed this pattern already :)

mysite
└───templates
Expand Down

0 comments on commit fe652e8

Please sign in to comment.