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