2016-01-03 10:56:22 +00:00
|
|
|
===================
|
2008-08-23 22:25:40 +00:00
|
|
|
Quick install guide
|
|
|
|
===================
|
|
|
|
|
|
|
|
Before you can use Django, you'll need to get it installed. We have a
|
2010-08-19 19:27:44 +00:00
|
|
|
:doc:`complete installation guide </topics/install>` that covers all the
|
2019-06-17 14:54:55 +00:00
|
|
|
possibilities; this guide will guide you to a minimal installation that'll work
|
|
|
|
while you walk through the introduction.
|
2008-08-23 22:25:40 +00:00
|
|
|
|
|
|
|
Install Python
|
2016-01-03 10:56:22 +00:00
|
|
|
==============
|
2008-08-23 22:25:40 +00:00
|
|
|
|
2021-07-23 06:48:16 +00:00
|
|
|
Being a Python web framework, Django requires Python. See
|
2015-06-15 13:43:35 +00:00
|
|
|
:ref:`faq-python-version-support` for details. Python includes a lightweight
|
|
|
|
database called SQLite_ so you won't need to set up a database just yet.
|
2008-08-23 22:25:40 +00:00
|
|
|
|
2021-04-27 11:09:00 +00:00
|
|
|
.. _sqlite: https://www.sqlite.org/
|
2008-08-23 22:25:40 +00:00
|
|
|
|
2017-05-20 15:51:21 +00:00
|
|
|
Get the latest version of Python at https://www.python.org/downloads/ or with
|
2013-12-30 17:15:49 +00:00
|
|
|
your operating system's package manager.
|
2008-08-23 22:25:40 +00:00
|
|
|
|
2010-11-23 03:54:13 +00:00
|
|
|
You can verify that Python is installed by typing ``python`` from your shell;
|
|
|
|
you should see something like:
|
2023-02-09 15:48:46 +00:00
|
|
|
|
2010-11-23 03:54:13 +00:00
|
|
|
.. code-block:: pycon
|
2008-08-23 22:25:40 +00:00
|
|
|
|
2017-02-18 00:45:34 +00:00
|
|
|
Python 3.x.y
|
2015-05-15 10:35:19 +00:00
|
|
|
[GCC 4.x] on linux
|
2008-08-23 22:25:40 +00:00
|
|
|
Type "help", "copyright", "credits" or "license" for more information.
|
|
|
|
>>>
|
2010-08-19 19:27:44 +00:00
|
|
|
|
2008-08-23 22:25:40 +00:00
|
|
|
Set up a database
|
2016-01-03 10:56:22 +00:00
|
|
|
=================
|
2008-08-23 22:25:40 +00:00
|
|
|
|
2012-04-21 12:35:06 +00:00
|
|
|
This step is only necessary if you'd like to work with a "large" database engine
|
2019-05-27 17:59:49 +00:00
|
|
|
like PostgreSQL, MariaDB, MySQL, or Oracle. To install such a database, consult
|
|
|
|
the :ref:`database installation information <database-installation>`.
|
2008-08-23 22:25:40 +00:00
|
|
|
|
|
|
|
Install Django
|
2016-01-03 10:56:22 +00:00
|
|
|
==============
|
2008-08-23 22:25:40 +00:00
|
|
|
|
2019-06-17 14:54:55 +00:00
|
|
|
You've got three options to install Django:
|
2008-08-23 22:25:40 +00:00
|
|
|
|
2011-10-14 00:12:01 +00:00
|
|
|
* :ref:`Install an official release <installing-official-release>`. This
|
2015-07-24 14:14:24 +00:00
|
|
|
is the best approach for most users.
|
2010-08-19 19:27:44 +00:00
|
|
|
|
2017-01-10 14:29:23 +00:00
|
|
|
* Install a version of Django :ref:`provided by your operating system
|
|
|
|
distribution <installing-distribution-package>`.
|
|
|
|
|
2011-10-14 00:12:01 +00:00
|
|
|
* :ref:`Install the latest development version
|
2015-07-24 14:14:24 +00:00
|
|
|
<installing-development-version>`. This option is for enthusiasts who want
|
|
|
|
the latest-and-greatest features and aren't afraid of running brand new code.
|
|
|
|
You might encounter new bugs in the development version, but reporting them
|
|
|
|
helps the development of Django. Also, releases of third-party packages are
|
|
|
|
less likely to be compatible with the development version than with the
|
|
|
|
latest stable release.
|
2010-08-19 19:27:44 +00:00
|
|
|
|
2010-10-19 00:26:39 +00:00
|
|
|
.. admonition:: Always refer to the documentation that corresponds to the
|
|
|
|
version of Django you're using!
|
2008-08-23 22:25:40 +00:00
|
|
|
|
2010-01-10 17:47:53 +00:00
|
|
|
If you do either of the first two steps, keep an eye out for parts of the
|
2008-08-23 22:25:40 +00:00
|
|
|
documentation marked **new in development version**. That phrase flags
|
2010-01-10 17:47:53 +00:00
|
|
|
features that are only available in development versions of Django, and
|
|
|
|
they likely won't work with an official release.
|
2010-11-23 03:54:13 +00:00
|
|
|
|
|
|
|
|
|
|
|
Verifying
|
2016-01-03 10:56:22 +00:00
|
|
|
=========
|
2010-11-23 03:54:13 +00:00
|
|
|
|
|
|
|
To verify that Django can be seen by Python, type ``python`` from your shell.
|
2013-01-08 20:58:11 +00:00
|
|
|
Then at the Python prompt, try to import Django:
|
|
|
|
|
|
|
|
.. parsed-literal::
|
2010-11-23 03:54:13 +00:00
|
|
|
|
|
|
|
>>> import django
|
2012-04-28 16:02:01 +00:00
|
|
|
>>> print(django.get_version())
|
2013-01-08 20:58:11 +00:00
|
|
|
|version|
|
2010-11-23 03:54:13 +00:00
|
|
|
|
2012-07-28 17:17:33 +00:00
|
|
|
You may have another version of Django installed.
|
2010-11-23 03:54:13 +00:00
|
|
|
|
2008-08-23 22:25:40 +00:00
|
|
|
That's it!
|
2016-01-03 10:56:22 +00:00
|
|
|
==========
|
2008-08-23 22:25:40 +00:00
|
|
|
|
2010-08-19 19:27:44 +00:00
|
|
|
That's it -- you can now :doc:`move onto the tutorial </intro/tutorial01>`.
|