commit | author | age
|
17cf32
|
1 |
.. _configuration_module: |
CM |
2 |
|
66b20a
|
3 |
.. role:: methodcategory |
CM |
4 |
:class: methodcategory |
|
5 |
|
d7f259
|
6 |
:mod:`pyramid.config` |
CM |
7 |
--------------------- |
17cf32
|
8 |
|
d7f259
|
9 |
.. automodule:: pyramid.config |
17cf32
|
10 |
|
66b20a
|
11 |
.. autoclass:: Configurator |
17cf32
|
12 |
|
66b20a
|
13 |
:methodcategory:`Controlling Configuration State` |
7534ba
|
14 |
|
66b20a
|
15 |
.. automethod:: commit |
CM |
16 |
.. automethod:: begin |
|
17 |
.. automethod:: end |
|
18 |
.. automethod:: include |
|
19 |
.. automethod:: make_wsgi_app() |
af55b8
|
20 |
.. automethod:: route_prefix_context |
66b20a
|
21 |
.. automethod:: scan |
bdd2b1
|
22 |
|
66b20a
|
23 |
:methodcategory:`Adding Routes and Views` |
388544
|
24 |
|
66b20a
|
25 |
.. automethod:: add_route |
CM |
26 |
.. automethod:: add_static_view(name, path, cache_max_age=3600, permission=NO_PERMISSION_REQUIRED) |
|
27 |
.. automethod:: add_view |
0db4a1
|
28 |
.. automethod:: add_notfound_view |
a7fe30
|
29 |
.. automethod:: add_forbidden_view |
af77a1
|
30 |
.. automethod:: add_exception_view |
388544
|
31 |
|
66b20a
|
32 |
:methodcategory:`Adding an Event Subscriber` |
388544
|
33 |
|
66b20a
|
34 |
.. automethod:: add_subscriber |
388544
|
35 |
|
66b20a
|
36 |
:methodcategory:`Using Security` |
388544
|
37 |
|
66b20a
|
38 |
.. automethod:: set_authentication_policy |
CM |
39 |
.. automethod:: set_authorization_policy |
de3d0c
|
40 |
.. automethod:: set_default_csrf_options |
7c0f09
|
41 |
.. automethod:: set_csrf_storage_policy |
e25a70
|
42 |
.. automethod:: set_default_permission |
6b180c
|
43 |
.. automethod:: add_permission |
e25a70
|
44 |
|
2c2534
|
45 |
:methodcategory:`Extending the Request Object` |
af7a1d
|
46 |
|
023c88
|
47 |
.. automethod:: add_request_method |
10320e
|
48 |
|
66b20a
|
49 |
:methodcategory:`Using I18N` |
da358e
|
50 |
|
66b20a
|
51 |
.. automethod:: add_translation_dirs |
CM |
52 |
.. automethod:: set_locale_negotiator |
cae85d
|
53 |
|
66b20a
|
54 |
:methodcategory:`Overriding Assets` |
1a42bd
|
55 |
|
66b20a
|
56 |
.. automethod:: override_asset(to_override, override_with) |
af2323
|
57 |
|
66b20a
|
58 |
:methodcategory:`Getting and Adding Settings` |
388544
|
59 |
|
66b20a
|
60 |
.. automethod:: add_settings |
388544
|
61 |
.. automethod:: get_settings |
CM |
62 |
|
66b20a
|
63 |
:methodcategory:`Hooking Pyramid Behavior` |
CM |
64 |
|
074994
|
65 |
.. automethod:: add_accept_view_order |
66b20a
|
66 |
.. automethod:: add_renderer |
CM |
67 |
.. automethod:: add_resource_url_adapter |
|
68 |
.. automethod:: add_response_adapter |
|
69 |
.. automethod:: add_traverser |
|
70 |
.. automethod:: add_tween |
0196b2
|
71 |
.. automethod:: add_route_predicate |
de3d0c
|
72 |
.. automethod:: add_subscriber_predicate |
0196b2
|
73 |
.. automethod:: add_view_predicate |
35e632
|
74 |
.. automethod:: add_view_deriver |
0bee84
|
75 |
.. automethod:: set_execution_policy |
66b20a
|
76 |
.. automethod:: set_request_factory |
CM |
77 |
.. automethod:: set_root_factory |
|
78 |
.. automethod:: set_session_factory |
|
79 |
.. automethod:: set_view_mapper |
|
80 |
|
|
81 |
:methodcategory:`Extension Author APIs` |
388544
|
82 |
|
CM |
83 |
.. automethod:: action |
|
84 |
.. automethod:: add_directive |
|
85 |
.. automethod:: with_package |
225a7b
|
86 |
.. automethod:: derive_view |
388544
|
87 |
|
66b20a
|
88 |
:methodcategory:`Utility Methods` |
388544
|
89 |
|
CM |
90 |
.. automethod:: absolute_asset_spec |
66b20a
|
91 |
.. automethod:: maybe_dotted |
388544
|
92 |
|
66b20a
|
93 |
:methodcategory:`ZCA-Related APIs` |
CM |
94 |
|
|
95 |
.. automethod:: hook_zca |
|
96 |
.. automethod:: unhook_zca |
225a7b
|
97 |
.. automethod:: setup_registry |
66b20a
|
98 |
|
CM |
99 |
:methodcategory:`Testing Helper APIs` |
|
100 |
|
|
101 |
.. automethod:: testing_add_renderer |
|
102 |
.. automethod:: testing_add_subscriber |
|
103 |
.. automethod:: testing_resources |
|
104 |
.. automethod:: testing_securitypolicy |
|
105 |
|
|
106 |
:methodcategory:`Attributes` |
adfc23
|
107 |
|
ce5c42
|
108 |
.. attribute:: introspectable |
CM |
109 |
|
|
110 |
A shortcut attribute which points to the |
|
111 |
:class:`pyramid.registry.Introspectable` class (used during |
|
112 |
directives to provide introspection to actions). |
|
113 |
|
0b23b3
|
114 |
.. versionadded:: 1.3 |
57a0d7
|
115 |
|
CM |
116 |
.. attribute:: introspector |
|
117 |
|
|
118 |
The :term:`introspector` related to this configuration. It is an |
|
119 |
instance implementing the :class:`pyramid.interfaces.IIntrospector` |
65d4a6
|
120 |
interface. |
57a0d7
|
121 |
|
0b23b3
|
122 |
.. versionadded:: 1.3 |
388544
|
123 |
|
CM |
124 |
.. attribute:: registry |
|
125 |
|
|
126 |
The :term:`application registry` which holds the configuration |
|
127 |
associated with this configurator. |
adfc23
|
128 |
|
66b20a
|
129 |
.. attribute:: global_registries |
37e3be
|
130 |
|
66b20a
|
131 |
The set of registries that have been created for :app:`Pyramid` |
fa1ac6
|
132 |
applications, one for each call to |
66b20a
|
133 |
:meth:`pyramid.config.Configurator.make_wsgi_app` in the current |
CM |
134 |
process. The object itself supports iteration and has a ``last`` property |
|
135 |
containing the last registry loaded. |
37e3be
|
136 |
|
66b20a
|
137 |
The registries contained in this object are stored as weakrefs, thus they |
CM |
138 |
will only exist for the lifetime of the actual applications for which they |
|
139 |
are being used. |
37e3be
|
140 |
|
32333e
|
141 |
.. autoclass:: not_ |
568a02
|
142 |
|
MM |
143 |
.. attribute:: PHASE0_CONFIG |
|
144 |
.. attribute:: PHASE1_CONFIG |
|
145 |
.. attribute:: PHASE2_CONFIG |
|
146 |
.. attribute:: PHASE3_CONFIG |