Difference between revisions of "Django"
(Created page with "==Installation== There are a few ways to install Django, perhaps the cleanest and easiest is by using ''pip''. With Python 3+ you will need to install pip3 first, like <pre> a...") |
|||
Line 1: | Line 1: | ||
− | + | =Installation= | |
There are a few ways to install Django, perhaps the cleanest and easiest is by using ''pip''. With Python 3+ | There are a few ways to install Django, perhaps the cleanest and easiest is by using ''pip''. With Python 3+ | ||
you will need to install pip3 first, like | you will need to install pip3 first, like | ||
Line 21: | Line 21: | ||
</pre> | </pre> | ||
− | + | =DB= | |
Django comes packaged with a sqlite database. It will work fine for initial development and testing, | Django comes packaged with a sqlite database. It will work fine for initial development and testing, | ||
but it's pretty certain that it won't handle concurrency well if it all. There are a few reasons for | but it's pretty certain that it won't handle concurrency well if it all. There are a few reasons for | ||
Line 27: | Line 27: | ||
file. | file. | ||
− | If the application requires | + | If the application requires any level of concurrency a different DB engine will be needed such as |
− | any level of concurrency a different DB engine will be needed such as PostgreSQL, MySQL, Oracle etc. | + | PostgreSQL, MySQL, Oracle etc. |
Revision as of 18:04, 7 March 2017
Installation
There are a few ways to install Django, perhaps the cleanest and easiest is by using pip. With Python 3+ you will need to install pip3 first, like
apt-get install python3-pip
After that, Django is obtained by
pip3 install django==1.10
...and other versions available instead of 1.10 can be specified if needed. An important and popular Django add-on package "tables2" can be added likewise:
pip3 install django-tables2
To check which version of Django you are using at the moment, start interactive Python and use this:
import django django.VERSION
DB
Django comes packaged with a sqlite database. It will work fine for initial development and testing, but it's pretty certain that it won't handle concurrency well if it all. There are a few reasons for that, in particular lack of table/row lock capability, and the presence of the file lock on the DB file.
If the application requires any level of concurrency a different DB engine will be needed such as PostgreSQL, MySQL, Oracle etc.