diff --git a/docs/intro/install.txt b/docs/intro/install.txt index edac4cfb89..0b4cf87938 100644 --- a/docs/intro/install.txt +++ b/docs/intro/install.txt @@ -13,7 +13,10 @@ Being a Python Web framework, Django requires Python. It works with any Python version from 2.4 to 2.7 (due to backwards incompatibilities in Python 3.0, Django does not currently work with Python 3.0; see :doc:`the Django FAQ ` for more -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_. +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_. .. _sqlite: http://sqlite.org/ @@ -27,7 +30,8 @@ probably already have it installed. .. _jython: http://www.jython.org/ -You can verify that Python's installed by typing ``python`` from your shell; you should see something like:: +You can verify that Python is installed by typing ``python`` from your shell; +you should see something like:: Python 2.5.1 (r251:54863, Jan 17 2008, 19:35:17) [GCC 4.0.1 (Apple Inc. build 5465)] on darwin @@ -74,7 +78,19 @@ You've got three easy options to install Django: documentation marked **new in development version**. That phrase flags features that are only available in development versions of Django, and they likely won't work with an official release. - + + +Verifying +--------- + +To verify that Django can be seen by Python, type ``python`` from your shell. +Then at the Python prompt, try to import Django:: + + >>> import django + >>> print django.get_version() + 1.3 + + That's it! ---------- diff --git a/docs/topics/install.txt b/docs/topics/install.txt index 1804f1cc24..791ba511cb 100644 --- a/docs/topics/install.txt +++ b/docs/topics/install.txt @@ -161,6 +161,8 @@ If you installed Django from a Python egg, remove the Django ``.egg`` file, and remove the reference to the egg in the file named ``easy-install.pth``. This file should also be located in your ``site-packages`` directory. +.. _finding-site-packages: + .. admonition:: Where are my ``site-packages`` stored? The location of the ``site-packages`` directory depends on the operating @@ -250,35 +252,21 @@ latest bug fixes and improvements, follow these instructions: svn co http://code.djangoproject.com/svn/django/trunk/ django-trunk -3. Next, make sure that the Python interpreter can load Django's code. There - are various ways of accomplishing this. One of the most convenient, on - Linux, Mac OSX or other Unix-like systems, is to use a symbolic link: +3. Next, make sure that the Python interpreter can load Django's code. The most + convenient way to do this is to + `modify Python's search path `_. Add a ``.pth`` + file containing the full path to the ``django-trunk`` directory to your + system's ``site-packages`` directory. For example, on a Unix-like system: .. code-block:: bash - ln -s WORKING-DIR/django-trunk/django SITE-PACKAGES-DIR/django + echo WORKING-DIR/django-trunk > SITE-PACKAGES-DIR/django.pth (In the above line, change ``SITE-PACKAGES-DIR`` to match the location of your system's ``site-packages`` directory, as explained in the - "Where are my ``site-packages`` stored?" section above. Change WORKING-DIR - to match the full path to your new ``django-trunk`` directory.) - - Alternatively, you can define your ``PYTHONPATH`` environment variable - so that it includes the ``django-trunk`` directory. This is perhaps the - most convenient solution on Windows systems, which don't support symbolic - links. (Environment variables can be defined on Windows systems `from the - Control Panel`_.) - - .. admonition:: What about Apache and mod_wsgi? - - If you take the approach of setting ``PYTHONPATH``, you'll need - to remember to do the same thing in your WSGI application once - you deploy your production site. Do this by appending to - ``sys.path`` in your WSGI application. - - More information about deployment is available, of course, in our - :doc:`How to use Django with mod_wsgi ` - documentation. + :ref:`Where are my site-packages stored? ` section + above. Change ``WORKING-DIR/django-trunk`` to match the full path to your + new ``django-trunk`` directory.) 4. On Unix-like systems, create a symbolic link to the file ``django-trunk/django/bin/django-admin.py`` in a directory on your system @@ -307,4 +295,4 @@ this, Subversion will automatically download any changes. .. _`download page`: http://www.djangoproject.com/download/ .. _Subversion: http://subversion.tigris.org/ -.. _from the Control Panel: http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/sysdm_advancd_environmnt_addchange_variable.mspx +.. _modify-python-path: http://docs.python.org/install/index.html#modifying-python-s-search-path