Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixes #6739 -- better development installation docs. Thanks to Adam V…

…andenberg for inspiration.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@14686 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 8aa2485a58ea8139e9a769d36b07db809480994a 1 parent 4c5bf6c
Chris Beaven authored November 23, 2010
22  docs/intro/install.txt
@@ -13,7 +13,10 @@ Being a Python Web framework, Django requires Python. It works with any Python
13 13
 version from 2.4 to 2.7 (due to backwards
14 14
 incompatibilities in Python 3.0, Django does not currently work with
15 15
 Python 3.0; see :doc:`the Django FAQ </faq/install>` for more
16  
-information on supported Python versions and the 3.0 transition), but we recommend installing Python 2.5 or later. If you do so, you won't need to set up a database just yet: Python 2.5 or later includes a lightweight database called SQLite_.
  16
+information on supported Python versions and the 3.0 transition), but we
  17
+recommend installing Python 2.5 or later. If you do so, you won't need to set
  18
+up a database just yet: Python 2.5 or later includes a lightweight database
  19
+called SQLite_.
17 20
 
18 21
 .. _sqlite: http://sqlite.org/
19 22
 
@@ -27,7 +30,8 @@ probably already have it installed.
27 30
 
28 31
 .. _jython: http://www.jython.org/
29 32
 
30  
-You can verify that Python's installed by typing ``python`` from your shell; you should see something like::
  33
+You can verify that Python is installed by typing ``python`` from your shell;
  34
+you should see something like::
31 35
 
32 36
     Python 2.5.1 (r251:54863, Jan 17 2008, 19:35:17)
33 37
     [GCC 4.0.1 (Apple Inc. build 5465)] on darwin
@@ -74,7 +78,19 @@ You've got three easy options to install Django:
74 78
     documentation marked **new in development version**. That phrase flags
75 79
     features that are only available in development versions of Django, and
76 80
     they likely won't work with an official release.
77  
-    
  81
+
  82
+
  83
+Verifying
  84
+---------
  85
+
  86
+To verify that Django can be seen by Python, type ``python`` from your shell.
  87
+Then at the Python prompt, try to import Django::
  88
+
  89
+    >>> import django
  90
+    >>> print django.get_version()
  91
+    1.3
  92
+
  93
+
78 94
 That's it!
79 95
 ----------
80 96
 
36  docs/topics/install.txt
@@ -161,6 +161,8 @@ If you installed Django from a Python egg, remove the Django ``.egg`` file,
161 161
 and remove the reference to the egg in the file named ``easy-install.pth``.
162 162
 This file should also be located in your ``site-packages`` directory.
163 163
 
  164
+.. _finding-site-packages:
  165
+
164 166
 .. admonition:: Where are my ``site-packages`` stored?
165 167
 
166 168
     The location of the ``site-packages`` directory depends on the operating
@@ -250,35 +252,21 @@ latest bug fixes and improvements, follow these instructions:
250 252
 
251 253
        svn co http://code.djangoproject.com/svn/django/trunk/ django-trunk
252 254
 
253  
-3. Next, make sure that the Python interpreter can load Django's code. There
254  
-   are various ways of accomplishing this.  One of the most convenient, on
255  
-   Linux, Mac OSX or other Unix-like systems, is to use a symbolic link:
  255
+3. Next, make sure that the Python interpreter can load Django's code. The most
  256
+   convenient way to do this is to
  257
+   `modify Python's search path <modify-python-path>`_. Add a ``.pth``
  258
+   file containing the full path to the ``django-trunk`` directory to your
  259
+   system's ``site-packages`` directory. For example, on a Unix-like system:
256 260
 
257 261
    .. code-block:: bash
258 262
 
259  
-       ln -s WORKING-DIR/django-trunk/django SITE-PACKAGES-DIR/django
  263
+       echo WORKING-DIR/django-trunk > SITE-PACKAGES-DIR/django.pth
260 264
 
261 265
    (In the above line, change ``SITE-PACKAGES-DIR`` to match the location of
262 266
    your system's ``site-packages`` directory, as explained in the
263  
-   "Where are my ``site-packages`` stored?" section above. Change WORKING-DIR
264  
-   to match the full path to your new ``django-trunk`` directory.)
265  
-
266  
-   Alternatively, you can define your ``PYTHONPATH`` environment variable
267  
-   so that it includes the ``django-trunk`` directory. This is perhaps the
268  
-   most convenient solution on Windows systems, which don't support symbolic
269  
-   links. (Environment variables can be defined on Windows systems `from the
270  
-   Control Panel`_.)
271  
-
272  
-   .. admonition:: What about Apache and mod_wsgi?
273  
-
274  
-      If you take the approach of setting ``PYTHONPATH``, you'll need
275  
-      to remember to do the same thing in your WSGI application once
276  
-      you deploy your production site. Do this by appending to
277  
-      ``sys.path`` in your WSGI application.
278  
-
279  
-      More information about deployment is available, of course, in our
280  
-      :doc:`How to use Django with mod_wsgi </howto/deployment/modwsgi>`
281  
-      documentation.
  267
+   :ref:`Where are my site-packages stored? <finding-site-packages>` section
  268
+   above. Change ``WORKING-DIR/django-trunk`` to match the full path to your
  269
+   new ``django-trunk`` directory.)
282 270
 
283 271
 4. On Unix-like systems, create a symbolic link to the file
284 272
    ``django-trunk/django/bin/django-admin.py`` in a directory on your system
@@ -307,4 +295,4 @@ this, Subversion will automatically download any changes.
307 295
 
308 296
 .. _`download page`: http://www.djangoproject.com/download/
309 297
 .. _Subversion: http://subversion.tigris.org/
310  
-.. _from the Control Panel: http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/sysdm_advancd_environmnt_addchange_variable.mspx
  298
+.. _modify-python-path: http://docs.python.org/install/index.html#modifying-python-s-search-path

0 notes on commit 8aa2485

Please sign in to comment.
Something went wrong with that request. Please try again.