Difference between revisions of "Django"

From ArchWiki
Jump to: navigation, search
(Add note about PostgreSQL backend)
(update Pkg/AUR templates)
(Tag: wiki-scripts)
 
Line 13: Line 13:
 
There are different DB backends available for Django:
 
There are different DB backends available for Django:
 
* For a [[PostgreSQL]] backend install {{Pkg|python-psycopg2}} package,
 
* For a [[PostgreSQL]] backend install {{Pkg|python-psycopg2}} package,
* If you intend to use a [[MySQL]]/MariaDB database as backend, install the {{AUR|python-mysqlclient}} package.
+
* If you intend to use a [[MySQL]]/MariaDB database as backend, install the {{Pkg|python-mysqlclient}} package.
  
 
== Usage ==
 
== Usage ==

Latest revision as of 20:58, 27 October 2018

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

Installation

Two packages of Django are currently available in the official repositories. They can be installed with the following packages:

Database driver

There are different DB backends available for Django:

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