You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/apps/feature_flags.md
+40-37Lines changed: 40 additions & 37 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,55 +5,32 @@ Additional library documentation can be found at https://cfpb.github.io/django-f
5
5
6
6
## Settings
7
7
8
-
Add `ansible_base.feature_flags` to your installed apps:
8
+
Add `ansible_base.feature_flags` to your installed apps and ensure `ansible_base.resource_registry` as added to enable flag state to sync across the platform:
9
9
10
10
```python
11
11
INSTALLED_APPS= [
12
12
...
13
13
'ansible_base.feature_flags',
14
+
'ansible_base.resource_registry', # Must also be added
14
15
]
15
16
```
16
17
17
-
### Additional Settings
18
+
##Detail
18
19
19
-
Additional settings are required to enable feature_flags.
20
-
This will happen automatically if using [dynamic_settings](../Installation.md)
21
-
22
-
First, you need to add `flags` to your `INSTALLED_APPS`:
20
+
By adding the `ansible_base.feature_flags` app to your application, all Ansible Automation Platform feature flags will be loaded and available in your component.
21
+
To receive flag state updates, ensure the following definition is available in your components `RESOURCE_LIST` -
23
22
24
23
```python
25
-
INSTALLED_APPS= [
26
-
...
27
-
'flags',
28
-
...
29
-
]
30
-
```
31
-
32
-
Additionally, create a `FLAGS` entry:
33
-
34
-
```python
35
-
FLAGS= {}
36
-
```
37
-
38
-
Finally, add `django.template.context_processors.request` to your `TEMPLATES``context_processors` setting:
24
+
from ansible_base.feature_flags.models import AAPFlag
25
+
from ansible_base.resource_registry.shared_types import FeatureFlagType
0 commit comments