/docs/intro/install.txt

https://code.google.com/p/mango-py/ · Plain Text · 100 lines · 68 code · 32 blank · 0 comment · 0 complexity · 3721e51fd857f1972d080351b20b5087 MD5 · raw file

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