install.txt 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. Quick install guide
  2. ===================
  3. Before you can use Django, you'll need to get it installed. We have a
  4. :doc:`complete installation guide </topics/install>` that covers all the
  5. possibilities; this guide will guide you to a simple, minimal installation
  6. that'll work while you walk through the introduction.
  7. Install Python
  8. --------------
  9. Being a Python Web framework, Django requires Python. It works with any Python
  10. version from 2.6 to 2.7 (due to backwards incompatibilities in Python 3.0,
  11. Django does not currently work with Python 3.0; see :doc:`the Django FAQ
  12. </faq/install>` for more information on supported Python versions and the 3.0
  13. transition), these versions of Python include a lightweight database called
  14. SQLite_ so you won't need to set up a database just yet.
  15. .. _sqlite: http://sqlite.org/
  16. Get Python at http://www.python.org. If you're running Linux or Mac OS X, you
  17. probably already have it installed.
  18. .. admonition:: Django on Jython
  19. If you use Jython_ (a Python implementation for the Java platform), you'll
  20. need to follow a few additional steps. See :doc:`/howto/jython` for details.
  21. .. _jython: http://www.jython.org/
  22. You can verify that Python is installed by typing ``python`` from your shell;
  23. you should see something like::
  24. Python 2.6.6 (r266:84292, Dec 26 2010, 22:31:48)
  25. [GCC 4.4.5] on linux2
  26. Type "help", "copyright", "credits" or "license" for more information.
  27. >>>
  28. Set up a database
  29. -----------------
  30. If you installed Python 2.6 or later, you can skip this step for now.
  31. If not, or if you'd like to work with a "large" database engine like PostgreSQL,
  32. MySQL, or Oracle, consult the :ref:`database installation information
  33. <database-installation>`.
  34. Remove any old versions of Django
  35. ---------------------------------
  36. If you are upgrading your installation of Django from a previous version, you
  37. will need to :ref:`uninstall the old Django version before installing the new
  38. version <removing-old-versions-of-django>`.
  39. Install Django
  40. --------------
  41. You've got three easy options to install Django:
  42. * Install a version of Django :doc:`provided by your operating system
  43. distribution </misc/distributions>`. This is the quickest option for those
  44. who have operating systems that distribute Django.
  45. * :ref:`Install an official release <installing-official-release>`. This
  46. is the best approach for users who want a stable version number and aren't
  47. concerned about running a slightly older version of Django.
  48. * :ref:`Install the latest development version
  49. <installing-development-version>`. This is best for users who want the
  50. latest-and-greatest features and aren't afraid of running brand-new code.
  51. .. admonition:: Always refer to the documentation that corresponds to the
  52. version of Django you're using!
  53. If you do either of the first two steps, keep an eye out for parts of the
  54. documentation marked **new in development version**. That phrase flags
  55. features that are only available in development versions of Django, and
  56. they likely won't work with an official release.
  57. Verifying
  58. ---------
  59. To verify that Django can be seen by Python, type ``python`` from your shell.
  60. Then at the Python prompt, try to import Django::
  61. >>> import django
  62. >>> print django.get_version()
  63. 1.4
  64. That's it!
  65. ----------
  66. That's it -- you can now :doc:`move onto the tutorial </intro/tutorial01>`.