Mercurial > sat_legacy_website
comparison README @ 149:b1c16cd53b62
update django to version 1.11, refactor project structure, better PEP-8 compliance
author | souliane <souliane@mailoo.org> |
---|---|
date | Tue, 17 Oct 2017 04:11:21 +0200 |
parents | c1b77f07f644 |
children |
comparison
equal
deleted
inserted
replaced
148:75a95a1dfeb6 | 149:b1c16cd53b62 |
---|---|
10 the Free Software Foundation, either version 3 of the License, or | 10 the Free Software Foundation, either version 3 of the License, or |
11 (at your option) any later version. | 11 (at your option) any later version. |
12 | 12 |
13 SàT website is distributed in the hope that it will be useful, | 13 SàT website is distributed in the hope that it will be useful, |
14 but WITHOUT ANY WARRANTY; without even the implied warranty of | 14 but WITHOUT ANY WARRANTY; without even the implied warranty of |
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16 GNU Affero General Public License for more details. | 16 GNU Affero General Public License for more details. |
17 | 17 |
18 You should have received a copy of the GNU Affero General Public License | 18 You should have received a copy of the GNU Affero General Public License |
19 along with SàT website. If not, see <http://www.gnu.org/licenses/>. | 19 along with SàT website. If not, see <http://www.gnu.org/licenses/>. |
20 | 20 |
21 --- | 21 --- |
22 | 22 |
23 The third party projects are under compatible licences (see below) | 23 The third party projects are under compatible licences (see below) |
24 | 24 |
34 Salut à Toi is a communication software base on XMPP. You can have more informations on http://salut-a-toi.org (the website ran by this code). | 34 Salut à Toi is a communication software base on XMPP. You can have more informations on http://salut-a-toi.org (the website ran by this code). |
35 | 35 |
36 | 36 |
37 ** REQUIREMENTS ** | 37 ** REQUIREMENTS ** |
38 | 38 |
39 To run the website you need: | 39 To run the website, you need to install first Python 2.7 and some Python modules: |
40 - virtualenv and virtualenvwrapper are always nice to have | |
41 - pip | |
40 | 42 |
41 - Django 1.7.3 or superior ( https://www.djangoproject.com ) | 43 Then install the project own dependencies: |
42 - Django application "markdown_deux" ( https://github.com/trentm/django-markdown-deux ) | |
43 - Python module unicodecsv ( https://github.com/jdunck/python-unicodecsv ) | |
44 | 44 |
45 ** SETTINGS ** | 45 pip install -r requirements/base.txt |
46 | |
47 Please check the local_settings.py file which is distributed in the sat_website directory. | |
48 This is a template describing and initialising all settings. | |
49 | 46 |
50 | 47 |
51 ** RUNNING THE WEBSITE LOCALLY ** | 48 ** RUNNING THE WEBSITE LOCALLY ** |
52 | 49 |
53 This is the basic procedure to run the website on your local machine using the Django built-in web server. | 50 This is the basic procedure to run the website on your local machine using the Django built-in web server. |
54 Please make the difference between the project directory (e.g. ~/workspace/sat_website) and the app directory (e.g. ~/workspace/sat_website/sat_website). | 51 Please make the difference between the project directory (e.g. ~/workspace/sat_website) and the app directory (e.g. ~/workspace/sat_website/sat_website). |
55 | 52 |
56 First add these two lines to your shell .*rc file: | |
57 | |
58 export PYTHONPATH=$PYTHONPATH:<path_to_the_app_directory> | |
59 export DJANGO_SETTINGS_MODULE=settings | |
60 | |
61 Create in the app directory a file settings.py containing these lines: | |
62 | |
63 try: | |
64 from local_settings import * | |
65 except ImportError: | |
66 pass | |
67 | |
68 You can overwrite settings in settings.py after these lines. | |
69 In the project directory, enter this command to initialise the website (this has to be done only once): | 53 In the project directory, enter this command to initialise the website (this has to be done only once): |
70 | 54 |
71 django-admin syncdb | 55 ./manage.py syncdb |
72 | 56 |
73 If you modify some strings in the Django code, update the i18n .po files with: | 57 If you modify some strings in the Django code, update the i18n .po files with: |
74 | 58 |
75 django-admin makemessages -a | 59 ./manage.py makemessages -a |
76 | 60 |
77 After having completed your translations or after a pull from the repository, compile the .po files to their .mo equivalents (the later ones are not stored on the repository): | 61 After having completed your translations or after a pull from the repository, compile the .po files to their .mo equivalents (the later ones are not stored on the repository): |
78 | 62 |
79 django-admin compilemessages | 63 ./manage.py compilemessages |
80 | 64 |
81 Whenever you want to launch the web server: | 65 Whenever you want to launch the web server: |
82 | 66 |
83 django-admin runserver | 67 ./manage.py runserver |
84 | 68 |
85 You can also specify the interface and port, for example: | 69 You can also specify the interface and port, for example: |
86 | 70 |
87 django-admin runserver 192.168.2.1:8000 | 71 ./manage.py runserver 192.168.2.1:8000 |
72 | |
73 | |
74 ** HOW TO DEPLOY ** | |
75 | |
76 After having adapted the settings for your productive environment, you can run: | |
77 | |
78 ./deploy.sh | |
88 | 79 |
89 | 80 |
90 ** CREDIT ** | 81 ** CREDIT ** |
91 | 82 |
92 The following third party project are shipped with this source code: | 83 The following third party project are shipped with this source code: |
94 - Bootstrap v3.3.1 (http://getbootstrap.com) | Copyright 2011-2014 Twitter, Inc. | MIT licence: https://github.com/twbs/bootstrap/blob/master/LICENSE | 85 - Bootstrap v3.3.1 (http://getbootstrap.com) | Copyright 2011-2014 Twitter, Inc. | MIT licence: https://github.com/twbs/bootstrap/blob/master/LICENSE |
95 - jQuery v1.11.1 (http://jquery.org) | Copyright 2005-2014 jQuery Foundation, Inc. | MIT licence: jquery.org/license | 86 - jQuery v1.11.1 (http://jquery.org) | Copyright 2005-2014 jQuery Foundation, Inc. | MIT licence: jquery.org/license |
96 | 87 |
97 In addition, this project uses Django to run. | 88 In addition, this project uses Django to run. |
98 | 89 |
99 Thanks to the authors/contributors of these projects | 90 Thanks to the authors/contributors of these projects. |
100 | 91 |
101 | 92 |
102 ** CONTACT ** | 93 ** CONTACT ** |
103 | 94 |
104 Jérôme Poisson | 95 Jérôme Poisson |
105 | 96 |
106 e-mail: goffi@goffi.org | 97 e-mail: goffi@goffi.org |
107 jid: goffi@jabberfr.org | 98 jid: goffi@jabberfr.org |
108 |