Преглед на файлове

add documentations about settings and devtools

Guénaël Muller преди 6 години
родител
ревизия
74acfd1077
променени са 3 файла, в които са добавени 75 реда и са изтрити 1 реда
  1. 1 1
      README.md
  2. 28 0
      doc/devtools.md
  3. 46 0
      doc/setting.md

+ 1 - 1
README.md Целия файл

@@ -47,7 +47,7 @@ Install the project in editable mode with its testing requirements:
47 47
 
48 48
 ### Configure Tracim_backend ###
49 49
 
50
-Create configuration files for a development environment:
50
+Create [configuration file](doc/setting.md) for a development environment:
51 51
 
52 52
     cp development.ini.base development.ini
53 53
 

+ 28 - 0
doc/devtools.md Целия файл

@@ -0,0 +1,28 @@
1
+# Devtools
2
+
3
+# Check third party licences
4
+
5
+Install `yolk3k` pip package:
6
+
7
+    pip install yolk3k
8
+
9
+Then execute command:
10
+
11
+    yolk -l -f license
12
+
13
+Output will look like:
14
+
15
+```
16
+PyYAML (3.12) !
17
+    License: MIT
18
+
19
+Pygments (2.2.0) !
20
+    License: BSD License
21
+
22
+SQLAlchemy (1.2.5) !
23
+    License: MIT License
24
+
25
+Unidecode (1.0.22) !
26
+    License: GPL
27
+...
28
+```

+ 46 - 0
doc/setting.md Целия файл

@@ -0,0 +1,46 @@
1
+# Setting #
2
+
3
+Here is a short description of settings available in the file `development.ini`.
4
+
5
+## Listening port ##
6
+
7
+Default configuration is to listen on port 6534.
8
+If you want to adapt this to your environment, edit the `.ini` file and setup the port you want:
9
+
10
+    [server:main]
11
+    ...
12
+    listen = localhost:6543
13
+
14
+To allow other computer to access to this website, listen to "*" instead of localhost:
15
+
16
+    [server:main]
17
+    ...
18
+    listen = *:6534
19
+
20
+## Prod/Debug configuration ##
21
+
22
+
23
+To enable simple debug conf:
24
+
25
+    [app:main]
26
+    ...
27
+    pyramid.reload_templates = true
28
+    pyramid.debug_all = true
29
+    pyramid.includes =
30
+        pyramid_debugtoolbar
31
+
32
+production conf (no reload, no debugtoolbar):
33
+
34
+    [app:main]
35
+    ...
36
+    pyramid.reload_templates = false
37
+    pyramid.debug_authorization = false
38
+    pyramid.debug_notfound = false
39
+    pyramid.debug_routematch = false
40
+
41
+You can, of course, also set level of one of the different logger to have more/less log
42
+about something.
43
+
44
+    [logger_sqlalchemy]
45
+    ...
46
+    level = INFO