install.txt 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. FAQ: Installation
  2. =================
  3. How do I get started?
  4. ---------------------
  5. #. `Download the code`_.
  6. #. Install Django (read the :doc:`installation guide </intro/install>`).
  7. #. Walk through the :doc:`tutorial </intro/tutorial01>`.
  8. #. Check out the rest of the :doc:`documentation </index>`, and `ask questions`_ if you
  9. run into trouble.
  10. .. _`Download the code`: http://www.djangoproject.com/download/
  11. .. _ask questions: http://www.djangoproject.com/community/
  12. What are Django's prerequisites?
  13. --------------------------------
  14. Django requires Python_, specifically any version of Python from 2.5
  15. through 2.7. No other Python libraries are required for basic Django
  16. usage.
  17. For a development environment -- if you just want to experiment with Django --
  18. you don't need to have a separate Web server installed; Django comes with its
  19. own lightweight development server. For a production environment, Django
  20. follows the WSGI_ spec, which means it can run on a variety of server
  21. platforms. See :doc:`Deploying Django </howto/deployment/index>` for some
  22. popular alternatives. Also, the `server arrangements wiki page`_ contains
  23. details for several deployment strategies.
  24. If you want to use Django with a database, which is probably the case, you'll
  25. also need a database engine. PostgreSQL_ is recommended, because we're
  26. PostgreSQL fans, and MySQL_, `SQLite 3`_, and Oracle_ are also supported.
  27. .. _Python: http://www.python.org/
  28. .. _WSGI: http://www.python.org/dev/peps/pep-0333/
  29. .. _server arrangements wiki page: http://code.djangoproject.com/wiki/ServerArrangements
  30. .. _PostgreSQL: http://www.postgresql.org/
  31. .. _MySQL: http://www.mysql.com/
  32. .. _`SQLite 3`: http://www.sqlite.org/
  33. .. _Oracle: http://www.oracle.com/
  34. Do I lose anything by using Python 2.5 versus newer Python versions, such as Python 2.6 or 2.7?
  35. -----------------------------------------------------------------------------------------------
  36. Not in the core framework. Currently, Django itself officially supports any
  37. version of Python from 2.5 through 2.7, inclusive. However, newer versions of
  38. Python are often faster, have more features, and are better supported. If you
  39. use a newer version of Python you will also have access to some APIs that
  40. aren't available under older versions of Python. For example, since Python 2.6,
  41. you can use the advanced string formatting described in `PEP 3101`_.
  42. Third-party applications for use with Django are, of course, free to set their
  43. own version requirements.
  44. Over the next year or two Django will begin dropping support for older Python
  45. versions as part of a migration which will end with Django running on Python 3
  46. (see below for details).
  47. All else being equal, we recommend that you use the latest 2.x release
  48. (currently Python 2.7). This will let you take advantage of the numerous
  49. improvements and optimizations to the Python language since version 2.5, and
  50. will help ease the process of dropping support for older Python versions on
  51. the road to Python 3.
  52. .. _PEP 3101: http://www.python.org/dev/peps/pep-3101/
  53. Can I use Django with Python 2.4?
  54. ---------------------------------
  55. As of Django 1.4, no.
  56. Django 1.3 and earlier supported Python 2.4. Django 1.4 (the current development
  57. version, which hasn't been officially released) and newer version require
  58. Python 2.5 or greater (but not 3.x; see the next question.)
  59. We highly recommend you upgrade Python if possible, but Django 1.3.x will
  60. continue to support Python 2.4.
  61. Can I use Django with Python 3?
  62. -------------------------------
  63. Not at the moment. Python 3.0 introduced a number of
  64. backwards-incompatible changes to the Python language, and although
  65. these changes are generally a good thing for Python's future, it will
  66. be a while before most Python software catches up and is able to run
  67. on Python 3.0. For larger Python-based software like Django, the
  68. transition is expected to take at least a year or two (since it
  69. involves dropping support for older Python releases and so must be
  70. done gradually).
  71. In the meantime, Python 2.x releases will be supported and provided
  72. with bug fixes and security updates by the Python development team, so
  73. continuing to use a Python 2.x release during the transition should
  74. not present any risk.
  75. Will Django run under shared hosting (like TextDrive or Dreamhost)?
  76. -------------------------------------------------------------------
  77. See our `Django-friendly Web hosts`_ page.
  78. .. _`Django-friendly Web hosts`: http://code.djangoproject.com/wiki/DjangoFriendlyWebHosts
  79. Should I use the stable version or development version?
  80. -------------------------------------------------------
  81. Generally, if you're using code in production, you should be using a
  82. stable release. The Django project publishes a full stable release
  83. every nine months or so, with bugfix updates in between. These stable
  84. releases contain the API that is covered by our backwards
  85. compatibility guarantees; if you write code against stable releases,
  86. you shouldn't have any problems upgrading when the next official
  87. version is released.