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
* Fix readme and project links
* Set up Github Actions with tox
* We don't support py38
* Fix pytest configuration
* No need to install package to run tox
* Fix tox version mapping for Github Actions
* Test Django 4.2 with more Python versions
* Fix nightly workflow
* Trim down to supported Wagtail versions only
* Add support for Python 3.13
* PR feedback
Copy file name to clipboardExpand all lines: README.md
+6-7Lines changed: 6 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,7 +39,7 @@ Your site will probably have some of your own check/processor needs.
39
39
40
40
Custom checks can be implemented by subclassing `birdbath.checks.BaseCheck` and implementing the `check` method:
41
41
42
-
```
42
+
```python
43
43
from birdbath.checks import BaseCheck
44
44
45
45
@@ -54,7 +54,7 @@ The `check` method should either return `True` if the checks should continue, or
54
54
55
55
Custom processors can be implemented by subclassing `birdbath.processors.BaseProcessor` and implementing the `run` method:
56
56
57
-
```
57
+
```python
58
58
from birdbath.processors import BaseProcessor
59
59
60
60
@@ -65,7 +65,7 @@ class DeleteAllMyUsersProcessor(BaseProcessor):
65
65
66
66
There are also more specialised base classes in `birdbath.processors` that can help you write cleaner custom processors. For example, the above example could be written using the `BaseModelDeleter` class instead:
67
67
68
-
```
68
+
```python
69
69
from birdbath.processors import BaseModelDeleter
70
70
71
71
@@ -75,7 +75,7 @@ class DeleteAllMyUsersProcessor(BaseModelDeleter):
75
75
76
76
If you only need to delete a subset of users, you can override the `get_queryset()` method, like so:
77
77
78
-
```
78
+
```python
79
79
from birdbath.processors import BaseModelDeleter
80
80
81
81
@@ -88,8 +88,7 @@ class DeleteNonStaffUsersProcessor(BaseModelDeleter):
88
88
89
89
If you're looking to 'anonymise' rather than delete objects, you will likely find the `BaseModelAnonymiser` class useful. You just need to indicate the fields that should be 'anonymised' or 'cleared', and the class will do the rest. For example:
90
90
91
-
92
-
```
91
+
```python
93
92
from birdbath.processors import BaseModelAnonymiser
94
93
95
94
@@ -122,7 +121,7 @@ The class will generate:
122
121
123
122
If you have fields with custom validation requirements, or would simply like to generate more realistic replacement values, you can add 'generate' methods to your subclass to achieve this. `BaseModelAnonymiser` will automatically look for method matching the format `"generate_{field_name}"` when anoymising field values. For example, the following processor will generate random values for "account_holder" and "account_number" fields:
124
123
125
-
```
124
+
```python
126
125
from birdbath.processors import BaseModelAnonymiser
0 commit comments