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/plugins/development/dashboard-widgets.md
+11Lines changed: 11 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -47,3 +47,14 @@ class ReminderWidget(DashboardWidget):
47
47
defrender(self, request):
48
48
returnself.config.get('content')
49
49
```
50
+
51
+
## Initialization
52
+
53
+
To register the widget, it becomes essential to import the widget module. The recommended approach is to accomplish this within the `ready` method situated in your `PluginConfig`:
54
+
55
+
```python
56
+
classFooBarConfig(PluginConfig):
57
+
defready(self):
58
+
super().ready()
59
+
from . import widgets # point this to the above widget module you created
0 commit comments