File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -17,28 +17,28 @@ pip install django-knobs
1717
1818** 1. Add to ` INSTALLED_APPS ` :**
1919
20- ```python
21- INSTALLED_APPS = [
22- ...
23- "knobs",
24- ]
25- ```
20+ ``` python
21+ INSTALLED_APPS = [
22+ ...
23+ " knobs" ,
24+ ]
25+ ```
2626
2727** 2. Run migrations:**
2828
29- ```bash
30- python manage.py migrate
31- ```
29+ ``` bash
30+ python manage.py migrate
31+ ```
3232
3333** 3. Define your config values in ` settings.py ` :**
3434
35- ```python
36- from knobs import Knob
35+ ``` python
36+ from knobs import Knob
3737
38- KNOBS_CONFIG = {
39- "MAX_LOGIN_ATTEMPTS": Knob(default=5, help_text="Max failed logins before lockout", category="auth"),
40- "FEATURE_NEW_UI": Knob(default=False, help_text="Enable redesigned UI", category="features"),
41- "API_TIMEOUT": Knob(default=30.0, help_text="Outbound request timeout (seconds)", category="api"),
42- "WELCOME_MSG": Knob(default="Hello!", help_text="Welcome banner text", category="general"),
43- }
44- ```
38+ KNOBS_CONFIG = {
39+ " MAX_LOGIN_ATTEMPTS" : Knob(default = 5 , help_text = " Max failed logins before lockout" , category = " auth" ),
40+ " FEATURE_NEW_UI" : Knob(default = False , help_text = " Enable redesigned UI" , category = " features" ),
41+ " API_TIMEOUT" : Knob(default = 30.0 , help_text = " Outbound request timeout (seconds)" , category = " api" ),
42+ " WELCOME_MSG" : Knob(default = " Hello!" , help_text = " Welcome banner text" , category = " general" ),
43+ }
44+ ```
You can’t perform that action at this time.
0 commit comments