From a3ef25617748fa02d283ad20e7cdf9707e93fa58 Mon Sep 17 00:00:00 2001 From: Daniel Edgy Edgecombe Date: Sun, 27 Jul 2014 03:03:17 +0200 Subject: [PATCH 1/3] using directory instead of folder consistently; also fixing a few remaining mysite base directory references --- css/README.md | 4 ++-- django_forms/README.md | 2 +- django_installation/README.md | 6 +++--- django_models/README.md | 4 ++-- django_orm/README.md | 2 +- django_start_project/README.md | 6 +++--- extend_your_application/README.md | 2 +- html/README.md | 6 +++--- intro_to_command_line/README.md | 12 ++++++------ optional_postgresql_installation/README.md | 2 +- python_installation/README.md | 2 +- template_extending/README.md | 2 +- 12 files changed, 25 insertions(+), 25 deletions(-) diff --git a/css/README.md b/css/README.md index 2b0623f9e35..ba16aa17f9d 100644 --- a/css/README.md +++ b/css/README.md @@ -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 @@ -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 diff --git a/django_forms/README.md b/django_forms/README.md index d3fb393e326..2ad98a3b110 100644 --- a/django_forms/README.md +++ b/django_forms/README.md @@ -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 diff --git a/django_installation/README.md b/django_installation/README.md index 8c9b9c20f91..3f15b72f092 100644 --- a/django_installation/README.md +++ b/django_installation/README.md @@ -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: @@ -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 drectory 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 @@ -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 diff --git a/django_models/README.md b/django_models/README.md index 3f5a598b48a..3853da8a399 100644 --- a/django_models/README.md +++ b/django_models/README.md @@ -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 diff --git a/django_orm/README.md b/django_orm/README.md index 47bd752d28a..3e2eab59fbd 100644 --- a/django_orm/README.md +++ b/django_orm/README.md @@ -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`. diff --git a/django_start_project/README.md b/django_start_project/README.md index 8ffc17c375d..2a25f981da4 100644 --- a/django_start_project/README.md +++ b/django_start_project/README.md @@ -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 │ @@ -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 ... @@ -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 diff --git a/extend_your_application/README.md b/extend_your_application/README.md index 1d114c5ec76..3e93838be30 100644 --- a/extend_your_application/README.md +++ b/extend_your_application/README.md @@ -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 (in the directory `djangogirls`), `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: diff --git a/html/README.md b/html/README.md index 859933dcf0c..b6bb022d9d8 100644 --- a/html/README.md +++ b/html/README.md @@ -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/ diff --git a/intro_to_command_line/README.md b/intro_to_command_line/README.md index c6e1cd316e4..fac3656777f 100644 --- a/intro_to_command_line/README.md +++ b/intro_to_command_line/README.md @@ -11,11 +11,11 @@ Here is a summary of some useful commands: | ------------- |-----------|-------------| -----| | 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** For more about the above commands, check out the Further Information section below. These are just a very few of the possible black window commands. @@ -26,7 +26,7 @@ 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). +* 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). ## Further information about the commands above @@ -38,7 +38,7 @@ These are just a very few of the possible black window commands. For example if you are in a directory called c:\test, and there were three directories in that the test directory called A, B, and C, you could just type **cd A** and press enter. You would then be in the c:\test\A. -* The **cd ..** command - this will take you to the next folder up. +* The **cd ..** command - this will take you to the next directory up. * The **dir** (Windows) and **ls** (others) command - this will list the files and directories contained in your current directory. If I typed **dir \test** or **ls test** I would see the contents of the c:\test directory. @@ -52,7 +52,7 @@ Also note for many commands you can use the \* symbol which stands for wildcard. * The **move** (Windows) or **mv** (others) command - this allows you to move files from one location to another. The syntax you use is the same as for the **copy** command. -* The **mkdir** command - this allows you to create a new directory. For example **mkdir temp** creates a new folder called temp in the current directory. +* The **mkdir** command - this allows you to create a new directory. For example **mkdir temp** creates a new directory called temp in the current directory. * The **del** (Windows) or **rm** command (others) - this allows you to delete the specified file. For example, **del test.txt** deletes the test.txt file from the current directory. diff --git a/optional_postgresql_installation/README.md b/optional_postgresql_installation/README.md index ce9eef032bb..7fd5ff6252d 100644 --- a/optional_postgresql_installation/README.md +++ b/optional_postgresql_installation/README.md @@ -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). diff --git a/python_installation/README.md b/python_installation/README.md index 291e29be158..96f1b0b32a9 100644 --- a/python_installation/README.md +++ b/python_installation/README.md @@ -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 diff --git a/template_extending/README.md b/template_extending/README.md index 44a868f3a17..48b2ebf33e6 100644 --- a/template_extending/README.md +++ b/template_extending/README.md @@ -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 From 71a83a0100bdb4fcaf34cc9b332b5c14fee6c519 Mon Sep 17 00:00:00 2001 From: Daniel Edgy Edgecombe Date: Sun, 27 Jul 2014 11:24:21 +0200 Subject: [PATCH 2/3] typo --- django_installation/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django_installation/README.md b/django_installation/README.md index 3f15b72f092..4f1e3d78cb9 100644 --- a/django_installation/README.md +++ b/django_installation/README.md @@ -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 drectory 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 From 062a3450ac16d8c7f2775adf3375415044f0e20f Mon Sep 17 00:00:00 2001 From: Daniel Edgy Edgecombe Date: Sun, 27 Jul 2014 11:26:02 +0200 Subject: [PATCH 3/3] small tweak --- extend_your_application/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extend_your_application/README.md b/extend_your_application/README.md index 3e93838be30..74853569f42 100644 --- a/extend_your_application/README.md +++ b/extend_your_application/README.md @@ -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 the directory `djangogirls`), `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: