Difference between revisions of "Django"
Kynikos.bot (talk | contribs) (Template:i18n is deprecated, use interlanguage links, see Help talk:I18n#"Dummy" interlanguage links and deprecation of Template:i18n) |
(Add note about PostgreSQL backend) |
||
(32 intermediate revisions by 18 users not shown) | |||
Line 1: | Line 1: | ||
− | [[Category: | + | [[Category:Web frameworks]] |
[[fr:Django]] | [[fr:Django]] | ||
− | + | [[ja:Django]] | |
− | + | [http://www.djangoproject.com 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 [[Pacman|installed]] with the following packages: | |
+ | * {{Pkg|python-django}} - Latest python support, with documentation in the {{aur|django-docs}} package from [[AUR]]. | ||
+ | * {{Pkg|python2-django}} - Python 2 legacy support | ||
− | + | === Database driver === | |
+ | There are different DB backends available for Django: | ||
+ | * 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. | ||
− | ==Usage== | + | == Usage == |
− | |||
− | + | If you wish to start a Django project, use {{ic|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 [https://docs.djangoproject.com/en/1.8/intro/tutorial01/ official Django tutorial] and [https://docs.djangoproject.com/en/ Django documentation]. | |
− | + | == See also == | |
− | |||
− | |||
− | |||
− | |||
− | + | *[https://github.com/rosarior/awesome-django awesome-django] - A curated list of Django apps, projects and resources. | |
− | + | *[https://devel.tech/features/django-vs-flask/ Django vs Flask] - Comparison of Django and Flask frameworks. | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | Django | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |
Latest revision as of 10:25, 18 February 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:
- python-django - Latest python support, with documentation in the django-docsAUR package from AUR.
- python2-django - Python 2 legacy support
Database driver
There are different DB backends available for Django:
- For a PostgreSQL backend install python-psycopg2 package,
- If you intend to use a MySQL/MariaDB database as backend, install the python-mysqlclientAUR 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.