File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,12 +2,13 @@ name: Documentation
22on :
33 push :
44 branches :
5- - master
65 - main
6+
77permissions :
88 contents : read
99 pages : write
1010 id-token : write
11+
1112jobs :
1213 deploy :
1314 environment :
Original file line number Diff line number Diff line change @@ -39,10 +39,10 @@ KNOBS_CONFIG = {
3939** 4. Use knobs in your code:**
4040
4141``` python
42- from knobs import knobs
42+ from knobs import config
4343
4444def my_view (request ):
45- if knobs .FEATURE_NEW_UI :
45+ if config .FEATURE_NEW_UI :
4646 return render(request, " new_ui.html" )
4747 return render(request, " old_ui.html" )
4848```
Original file line number Diff line number Diff line change 1- from django .conf import settings
21from django .db import migrations , models
32
43
54class Migration (migrations .Migration ):
6-
75 initial = True
86
9- dependencies = [
10- migrations .swappable_dependency (settings .AUTH_USER_MODEL ),
11- ]
12-
137 operations = [
148 migrations .CreateModel (
159 name = "KnobValue" ,
@@ -28,8 +22,8 @@ class Migration(migrations.Migration):
2822 ("updated_at" , models .DateTimeField (auto_now = True )),
2923 ],
3024 options = {
31- ' verbose_name' : ' config' ,
32- ' verbose_name_plural' : ' config' ,
25+ " verbose_name" : " config" ,
26+ " verbose_name_plural" : " config" ,
3327 "app_label" : "knobs" ,
3428 },
3529 ),
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ def __init__(
2222 self ._interval = interval
2323 self ._cache = cache
2424 self ._registry = registry
25- self ._last_max_updated_at : datetime | object = _UNSET
25+ self ._last_max_updated_at : datetime | object | None = _UNSET
2626
2727 def run (self ) -> None :
2828 while True :
You can’t perform that action at this time.
0 commit comments