|
1 | 1 |
|
2 |
| -# Django 1.9 Project Template - Bootstrap3, Allauth# |
| 2 | +# Django2/Django1.11 complete installer # |
3 | 3 |
|
4 | 4 | ## About ##
|
5 | 5 |
|
6 | 6 |
|
7 | 7 | This template installs a fully functional Django website in just a few minutes.
|
8 | 8 |
|
9 |
| -Works for Django 1.8 - 1.9.* |
10 |
| - |
11 |
| -This version of the project template includes new options for Django 1.8, has bootstrap3 installed and Allauth configured. |
12 |
| - |
13 |
| -There are different way of setting up a django environment, |
14 |
| -and this template is the result of many 'best practice' strategies for setting up a django project structure. |
15 |
| -It aims to be simple, clear, yet complete. |
| 9 | +Django 1.11 (for python2.7) |
| 10 | +Django 2 (python3) |
| 11 | +includes bootstrap3, Allauth, and some other useful apps. |
| 12 | + |
| 13 | +The goal of this template is to set up a fully functional django project in minutes, and have a clear project structure. |
| 14 | + |
| 15 | +``` |
| 16 | +src # project root |
| 17 | +├── manage.py |
| 18 | +├── /static |
| 19 | +├── /config # project configuration |
| 20 | +│ ├── /settings |
| 21 | +│ │ ├── base.py # project settings |
| 22 | +│ │ ├── local.py # local settings (development) |
| 23 | +│ ├── urls.py |
| 24 | +│ ├── wsgi.py |
| 25 | +├── /layout # base templates and static files |
| 26 | +│ ├── models.py |
| 27 | +│ ├── /static |
| 28 | +│ ├── /templates |
| 29 | +│ ... |
| 30 | +├── /myApp # create your app using Startapp.. |
| 31 | + ... |
| 32 | +``` |
16 | 33 |
|
17 | 34 | Demo: http://dj.lxer.eu
|
18 | 35 |
|
| 36 | + |
19 | 37 |
|
20 | 38 | ## Installation ##
|
21 | 39 |
|
22 | 40 |
|
23 | 41 | - Make sure you have libffi installed
|
24 |
| - - $ sudo apt-get install libffi-dev |
| 42 | +``` |
| 43 | +$ sudo apt-get install libffi-dev |
| 44 | +``` |
25 | 45 | - (when using python3) Make sure you have libevent-dev, python3-dev installed
|
26 |
| - - $ sudo apt-get install libevent-dev python3-dev |
| 46 | +``` |
| 47 | +$ sudo apt-get install libevent-dev python3-dev |
| 48 | +``` |
27 | 49 | - Install if not installed already (needed for bcrypt):
|
28 |
| - - $ sudo apt-get install build-essential libssl-dev libffi-dev python-dev |
29 |
| -- Install if not installed already (needed for pillow): |
30 |
| - - $ sudo apt-get install libtiff5-dev libjpeg8-dev |
31 |
| - |
| 50 | +``` |
| 51 | +$ sudo apt-get install build-essential libssl-dev libffi-dev python-dev libtiff5-dev libjpeg8-dev |
| 52 | +``` |
32 | 53 | - Create your working environment and virtualenv:
|
33 |
| - - $ virtualenv project |
34 |
| - |
35 |
| - python3: |
36 |
| - - $ virtualenv -p python3 project |
37 |
| - |
38 |
| -- $ cd project |
39 |
| -- $ source bin/activate |
40 |
| - |
41 |
| -- Now there are 2 options: either run install.sh |
42 |
| - - $ source <(wget -qO- https://raw.githubusercontent.com/allox/django-base-template-1.8/master/install.sh) |
| 54 | +``` |
| 55 | +$ virtualenv project |
| 56 | +$ virtualenv -p python3 project # for python3/django2 |
| 57 | +``` |
| 58 | +``` |
| 59 | +$ cd project |
| 60 | +$ source bin/activate |
| 61 | +``` |
| 62 | +- run install.sh : |
| 63 | +``` |
| 64 | +$ source <(wget -qO- https://raw.githubusercontent.com/FeedTheWeb/django-base-template/master/install.sh) |
| 65 | +``` |
43 | 66 |
|
44 |
| -or run the following manually: |
45 |
| - |
46 |
| -- $ pip install "Django>=1.8,<1.10" |
47 |
| -- $ bin/django-admin.py startproject --template https://github.com/allox/django-base-template-1.8/zipball/master --extension py,md,rst mainapp |
48 |
| -- $ mv mainapp/ src |
49 |
| -- $ cd src |
50 |
| -- Uncomment your preferred database adapter in requirements/compiled.txt (MySQL, Postgresql, or skip this step to stick with SQLite) |
51 |
| -- $ pip install -r requirements/local.txt |
52 |
| -- $ cp mainapp/settings/local-dist.py mainapp/settings/local.py |
53 |
| -- $ chmod +x manage.py |
54 |
| -- $ ./manage.py makemigrations |
55 |
| -- $ ./manage.py migrate |
56 |
| -- $ ./manage.py collectstatic |
57 |
| -- $ ./manage.py runserver |
58 |
| - |
| 67 | +...and that's all! |
59 | 68 |
|
60 | 69 |
|
61 | 70 |
|
|
0 commit comments