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