|
1 .. _config: |
|
2 |
|
3 PyAMS configuration |
|
4 =================== |
|
5 |
|
6 PyAMS application configuration is done via several complementary ways: |
|
7 |
|
8 - via Pyramid's configuration files located in 'etc/' folder |
|
9 |
|
10 - via settings applied to local utilities defined into ZODB |
|
11 |
|
12 - via ZCML files. |
|
13 |
|
14 |
|
15 Pyramid's configuration files |
|
16 ----------------------------- |
|
17 |
|
18 PyAMS is using default Pyramid's configuration files to define settings. When using default PyAMS scaffold, these |
|
19 INI files are stored into *etc* folder. Two files are created by scaffold: a development file (*development.ini*) and |
|
20 a production file (*production.ini*) which contain nearly the same directives, except for debug toolbar (activated only |
|
21 in development), Fanstatic configuration and logging. |
|
22 |
|
23 These files are actually documented, but here are a few important directives: |
|
24 |
|
25 - **zodbconn.uri**: |
|
26 |
|
27 - **pyams.application_factory**: |
|
28 |
|
29 - **pyams.application_name**: |
|
30 |
|
31 - **pyams_xxx.tcp_handler** and **pyams_xxx.start_handler**: |
|
32 |
|
33 - **pyams_content.config.tools_name**: |
|
34 |
|
35 - **pyams_content.config.xxx_tool_factory** and **pyams_content.config.xxx_tool_name**: |
|
36 |
|
37 |
|
38 Local registry utilities |
|
39 ------------------------ |
|
40 |
|
41 When the ZODB is created, PyAMS automatically create and register several utilities into the *local registry* (see |
|
42 :ref:`zca`). These utilities are created with default values which can be modified through management interface when |
|
43 the application is started. |
|
44 |
|
45 Some important utilities include: |
|
46 |
|
47 - a **catalog**: the catalog has the responsibility to index every content properties which are required to make quick |
|
48 and efficient searches. Catalog indexes are automatically created on database upgrade; management interface |
|
49 allows administrator to get indexes properties, to get the number of indexed objects and values for a given index, and |
|
50 to delete an index before recreating it by running the database upgrade script another time (see :ref:`scripts`). |
|
51 |
|
52 - an **internal IDs** utility: |
|
53 |
|
54 - a **language negotiator**: |
|
55 |
|
56 - a **portal templates** container: |
|
57 |
|
58 - a **security manager**: |
|
59 |
|
60 - a **sequential IDs** utility: |
|
61 |
|
62 - a **server timezone** utility: |
|
63 |
|
64 - a **user profiles** container: |
|
65 |
|
66 |
|
67 Optional utilities can also include: |
|
68 |
|
69 - an **Elasticsearch content indexer**: |
|
70 |
|
71 - a **maps manager**: |
|
72 |
|
73 - a **medias converter**: |
|
74 |
|
75 - a **tasks scheduler**: |
|
76 |
|
77 |
|
78 ZCML configuration files |
|
79 ------------------------ |
|
80 |
|
81 Adding more ZCML configuration directives is not mandatory in any way but can be useful in several use cases. For |
|
82 example, templates can't be overriden via Python annotations without creating a new subclass; this can be done |
|
83 easily via ZCML. |