diff --git a/chapter02.rst b/chapter02.rst index 8d31dbd..091774e 100644 --- a/chapter02.rst +++ b/chapter02.rst @@ -49,11 +49,11 @@ Installation If you're on Linux or Mac OS X, you probably have Python already installed. Type ``python`` at a command prompt (or in Applications/Utilities/Terminal, in OS X). If you see something like this, then Python is installed:: - - Python 2.7.3rc2 (default, Apr 22 2012, 22:30:17) + + Python 2.7.3rc2 (default, Apr 22 2012, 22:30:17) [GCC 4.6.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. - >>> + >>> Otherwise, you'll need to download and install Python. It's fast and easy, and detailed instructions are available at http://www.python.org/download/ @@ -74,7 +74,7 @@ in the documentation and by members of the community. Installing an Official Release ------------------------------ -Official releases have a version number, such as 1.4.2 or 1.4, and the latest +Official releases have a version number, such as 1.4.2, 1.4.1 or 1.4, and the latest one is always available at http://www.djangoproject.com/download/. If you're on a Linux distribution that includes a package of Django, it's a @@ -128,7 +128,7 @@ won't be broken at any given moment. With that said, though, some members of the Django team run production sites on the development version, so they have an incentive to keep it stable. -To grab the latest Django development version, follow these steps: +To grab the latest Django, follow these steps: #. Make sure you have Git installed. You can get the software free from http://git-scm.com/, and you can find @@ -161,7 +161,7 @@ To grab the latest Django development version, follow these steps: After downloading from Git and following the preceding steps, there's no need to run ``python setup.py install``-- you've just done the work by hand! -Because the Django development version changes often with bug fixes and feature +Because the Django code changes often with bug fixes and feature additions, you'll probably want to update it every once in a while. To update the code, just run the command ``git pull origin master`` from within the ``djmaster`` directory. When you run that command, Git will contact @@ -174,7 +174,7 @@ out which version of Django you're running. Knowing your version number is important if you ever need to reach out to the community for help, or if you submit improvements to the framework. In these cases, you should tell people the revision, also known as a "commit," that you're using. To find out your current -commit (the most recent commit is often called HEAD), type "git log -1" from +commit, type "git log -1" from within the ``django`` directory, and look for the identifier after "commit". This number changes each time Django is changed, whether through a bug fix, feature addition, documentation improvement or anything else. @@ -190,7 +190,7 @@ successful, you should be able to import the module ``django``: >>> import django >>> django.VERSION - (1, 4, 1, 'final', 0) + (1, 4, 2, 'final', 0) .. admonition:: Interactive Interpreter Examples @@ -389,14 +389,14 @@ The ``startproject`` command creates a directory containing five files:: .. note:: Doesn't match what you see? - The default project layout recently changed. If you're seeing a + The default project layout recently changed. If you're seeing a "flat" layout (with no inner ``mysite/`` directory), you're probably using a version of Django that doesn't match this tutorial version. This book covers - Django 1.4 and above, so if you're using an older version you probably want to + Django 1.4 and above, so if you're using an older version you probably want to consult Django's official documentation. - + The documentation for Django 1.X version is available at https://docs.djangoproject.com/en/1.X/. - + These files are as follows: * ``mysite/``: The outer ``mysite/`` directory is just a container for your project. @@ -422,7 +422,7 @@ These files are as follows: * ``urls.py``: The URLs for this Django project. Think of this as the "table of contents" of your Django-powered site. -* ``wsgi.py``: An entry-point for WSGI-compatible webservers to serve your project. +* ``wsgi.py``: An entry-point for WSGI-compatible webservers to serve your project. See How to deploy with WSGI (https://docs.djangoproject.com/en/1.4/howto/deployment/wsgi/) for more details. Despite their small size, these files already constitute a working Django @@ -458,7 +458,7 @@ You'll see something like this:: This launches the server locally, on port 8000, accessible only to connections from your own computer. Now that it's running, visit http://127.0.0.1:8000/ -with your Web browser. You might see a different Django version depending on +with your Web browser. You might see a different Django version depending on which version of Django you have installed. You'll see a "Welcome to Django" page shaded in a pleasant pastel blue. It worked!