Django - ArchWiki

# Django

From ArchWiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Django is a high-level Python Web framework which follows the model–view–template (MVT) architectural pattern.

## Installation

Install the python-django package which provides latest Python 3 support. Documentation can be installed with the django-docsAUR package.

### Database driver

There are different database backends available for Django:

- For a PostgreSQL backend install the python-psycopg2 package.
- If you intend to use a MySQL database as backend, install the python-mysqlclient package.

## Usage

If you wish to start a Django project, use `django-admin` command

    $ django-admin startproject mysite

This will create a `mysite` directory in your current directory. It will also create a `manage.py` script, which will let you interact with your project.

More information you will find in the official Django tutorial and Django documentation.

## See also

- awesome-django - A curated list of Django apps, projects and resources.
- Django vs Flask - Comparison of Django and Flask frameworks.

Category:

- Web frameworks