| 130 | | 2. Untar the downloaded file (e.g. ``tar xzvf Django-NNN.tar.gz``). |
|---|
| 131 | | |
|---|
| 132 | | 3. Change into the downloaded directory (e.g. ``cd Django-NNN``). |
|---|
| 133 | | |
|---|
| 134 | | 4. Run ``sudo python setup.py install``. |
|---|
| 135 | | |
|---|
| 136 | | The command will install Django in your Python installation's ``site-packages`` |
|---|
| 137 | | directory. |
|---|
| | 130 | 2. Untar the downloaded file (e.g. ``tar xzvf Django-NNN.tar.gz``, |
|---|
| | 131 | where ``NNN`` is the version number of the latest release). |
|---|
| | 132 | If you are a Windows user, you can download the command-line tool |
|---|
| | 133 | bsdtar_ to do this, or you can use a GUI-based tool such as 7-zip_. |
|---|
| | 134 | |
|---|
| | 135 | 3. Change into the directory created in step 2 (e.g. ``cd Django-NNN``). |
|---|
| | 136 | |
|---|
| | 137 | 4. If you are using Linux, Mac OSX or some other flavour of Unix, enter |
|---|
| | 138 | the command``sudo python setup.py install`` at the shell prompt. |
|---|
| | 139 | If you are using Windows, start up a command shell with administrator |
|---|
| | 140 | privileges and run the command ``setup.py install``. |
|---|
| | 141 | |
|---|
| | 142 | These commands will install Django in your Python installation's |
|---|
| | 143 | ``site-packages`` directory. |
|---|
| 147 | | 1. Make sure you have Subversion_ installed. |
|---|
| 148 | | 2. Check out the Django code into your Python ``site-packages`` directory. |
|---|
| 149 | | |
|---|
| 150 | | On Linux / Mac OSX / Unix, do this:: |
|---|
| 151 | | |
|---|
| 152 | | svn co http://code.djangoproject.com/svn/django/trunk/ django_src |
|---|
| 153 | | ln -s `pwd`/django_src/django SITE-PACKAGES-DIR/django |
|---|
| | 155 | 1. Make sure that you have Subversion_ installed, and that you can run its |
|---|
| | 156 | commands from a shell. (Enter ``svn help`` at a shell prompt to test |
|---|
| | 157 | this.) |
|---|
| | 158 | |
|---|
| | 159 | 2. Check out Django's main development branch (the 'trunk') like so:: |
|---|
| | 160 | |
|---|
| | 161 | svn co http://code.djangoproject.com/svn/django/trunk/ django-trunk |
|---|
| | 162 | |
|---|
| | 163 | 3. Next, you need to make sure that the Python interpreter can load Django's |
|---|
| | 164 | code. There are various ways of accomplishing this. One of the most |
|---|
| | 165 | convenient, on Linux, Mac OSX or other Unix-like systems, is to use a |
|---|
| | 166 | symbolic link:: |
|---|
| | 167 | |
|---|
| | 168 | ln -s `pwd`/django-trunk/django SITE-PACKAGES-DIR/django |
|---|
| 159 | | On Windows, do this:: |
|---|
| 160 | | |
|---|
| 161 | | svn co http://code.djangoproject.com/svn/django/trunk/django c:\Python24\lib\site-packages\django |
|---|
| 162 | | |
|---|
| 163 | | 3. Copy the file ``django_src/django/bin/django-admin.py`` to somewhere on your |
|---|
| 164 | | system path, such as ``/usr/local/bin`` (Unix) or ``C:\Python24\Scripts`` |
|---|
| | 174 | Alternatively, you can define your ``PYTHONPATH`` environment variable |
|---|
| | 175 | so that it includes the ``django`` subdirectory of ``django-trunk``. |
|---|
| | 176 | This is perhaps the most convenient solution on Windows systems, which |
|---|
| | 177 | don't support symbolic links. (Environment variables can be defined on |
|---|
| | 178 | Windows systems `from the Control Panel`_.) |
|---|
| | 179 | |
|---|
| | 180 | .. admonition:: What about Apache and mod_python? |
|---|
| | 181 | |
|---|
| | 182 | If you are using Apache and mod_python rather than Django's |
|---|
| | 183 | development server, then instead of defining the ``PYTHONPATH`` |
|---|
| | 184 | shell environment variable, you will need to specify the |
|---|
| | 185 | ``PythonPath`` directive in your Apache configuration file. |
|---|
| | 186 | |
|---|
| | 187 | 4. Copy the file ``django-trunk/django/bin/django-admin.py`` to somewhere on |
|---|
| | 188 | your system path, such as ``/usr/local/bin`` (Unix) or ``C:\Python24\Scripts`` |
|---|