Arthur de Jong

Open Source / Free Software developer

summaryrefslogtreecommitdiffstats
path: root/docs/intro/install.txt
blob: 71cd55daa5d29c4ce2d81c74af8679eda55d5433 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
Quick install guide
===================

Before you can use Django, you'll need to get it installed. We have a
:doc:`complete installation guide </topics/install>` that covers all the
possibilities; this guide will guide you to a simple, minimal installation
that'll work while you walk through the introduction.

Install Python
--------------

Being a Python Web framework, Django requires Python. See
: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.

.. _sqlite: http://sqlite.org/

Get the latest version of Python at https://www.python.org/download/ or with
your operating system's package manager.

.. admonition:: Django on Jython

    If you use Jython_ (a Python implementation for the Java platform), you'll
    need to follow a few additional steps. See :doc:`/howto/jython` for details.

.. _jython: http://www.jython.org/

You can verify that Python is installed by typing ``python`` from your shell;
you should see something like::

    Python 3.4.x
    [GCC 4.x] on linux
    Type "help", "copyright", "credits" or "license" for more information.
    >>>

Set up a database
-----------------

This step is only necessary if you'd like to work with a "large" database engine
like PostgreSQL, MySQL, or Oracle. To install such a database, consult the
:ref:`database installation information <database-installation>`.

Remove any old versions of Django
---------------------------------

If you are upgrading your installation of Django from a previous version, you
will need to :ref:`uninstall the old Django version before installing the new
version <removing-old-versions-of-django>`.

Install Django
--------------

You've got three easy options to install Django:

* Install a version of Django :doc:`provided by your operating system
  distribution </misc/distributions>`. This is the quickest option for those
  who have operating systems that distribute Django.

* :ref:`Install an official release <installing-official-release>`. This
  is the best approach for most users.

* :ref:`Install the latest development version
  <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.

.. admonition:: Always refer to the documentation that corresponds to the
    version of Django you're using!

    If you do either of the first two steps, keep an eye out for parts of the
    documentation marked **new in development version**. That phrase flags
    features that are only available in development versions of Django, and
    they likely won't work with an official release.


Verifying
---------

To verify that Django can be seen by Python, type ``python`` from your shell.
Then at the Python prompt, try to import Django:

.. parsed-literal::

    >>> import django
    >>> print(django.get_version())
    |version|

You may have another version of Django installed.

That's it!
----------

That's it -- you can now :doc:`move onto the tutorial </intro/tutorial01>`.