@@ -251,58 +251,68 @@ SCRUBBER_GLOBAL_SCRUBBERS = {
251
251
The seed used when generating random content by the Faker scrubber. Setting this to ` None ` means each scrubbing will
252
252
generate different data.
253
253
254
- (default: 42 )
254
+ (default: ` 42 ` )
255
255
256
256
### ` SCRUBBER_ENTRIES_PER_PROVIDER ` :
257
257
258
258
Number of entries to use as source for Faker scrubber. Increasing this value will increase the randomness of generated
259
259
data, but decrease performance.
260
260
261
- (default: 1000)
261
+ (default: ` 1000 ` )
262
262
263
263
### ` SCRUBBER_SKIP_UNMANAGED ` :
264
264
265
265
Do not attempt to scrub models which are not managed by the ORM.
266
266
267
- (default: True)
267
+ (default: ` True ` )
268
268
269
269
### ` SCRUBBER_APPS_LIST ` :
270
270
271
271
Only scrub models belonging to these specific django apps. If unset, will scrub all installed apps.
272
272
273
- (default: None)
273
+ (default: ` None ` )
274
274
275
275
### ` SCRUBBER_ADDITIONAL_FAKER_PROVIDERS ` :
276
276
277
277
Add additional fake providers to be used by Faker. Must be noted as full dotted path to the provider class.
278
278
279
- (default: empty list )
279
+ (default: ` {*()} ` , empty set )
280
280
281
281
### ` SCRUBBER_FAKER_LOCALE ` :
282
282
283
283
Set an alternative locale for Faker used during the scrubbing process.
284
284
285
- (default: None, falls back to Django's default locale)
285
+ (default: ` None ` , falls back to Django's default locale)
286
286
287
287
### ` SCRUBBER_MAPPING ` :
288
288
289
289
Define a class and a mapper which does not have to live inside the given model. Useful, if you have no control over the
290
290
models code you'd like to scrub.
291
291
292
+ ```` python
293
+ SCRUBBER_MAPPING = {
294
+ " auth.User" : " my_app.scrubbers.UserScrubbers" ,
295
+ }
296
+ ````
297
+
298
+ (default: ` {} ` )
299
+
292
300
### ` SCRUBBER_STRICT_MODE ` :
293
301
294
302
When strict mode is activated, you have to define a scrubbing policy for every field of every type defined in
295
303
` SCRUBBER_REQUIRED_FIELD_TYPES ` . If you have unscrubbed fields and this flag is active, you can't run
296
304
` python manage.py scrub_data ` .
297
305
306
+ (default: ` False ` )
307
+
298
308
### ` SCRUBBER_REQUIRED_FIELD_TYPES ` :
299
309
300
310
Defaults to all text-based Django model fields. Usually, privacy-relevant data is only stored in text-fields, numbers
301
311
and booleans (usually) can't contain sensitive personal data. These fields will be checked when running
302
312
` python manage.py scrub_validation ` .
303
313
304
- (default: (models.CharField, models.TextField, models.URLField, models.JSONField, models.GenericIPAddressField,
305
- models.EmailField,))
314
+ (default: ` (models.CharField, models.TextField, models.URLField, models.JSONField, models.GenericIPAddressField,
315
+ models.EmailField,)` )
306
316
307
317
### ` SCRUBBER_REQUIRED_FIELD_MODEL_WHITELIST ` :
308
318
@@ -314,15 +324,8 @@ against the full model name (e.g. `re.compile(auth.*)` to whitelist all auth mod
314
324
(default: `('auth.Group', 'auth.Permission', 'contenttypes.ContentType', 'sessions.Session', 'sites.Site',
315
325
'django_scrubber.FakeData', 'db.TestModel',)`)
316
326
317
- ```` python
318
- SCRUBBER_MAPPING = {
319
- " auth.User" : " my_app.scrubbers.UserScrubbers" ,
320
- }
321
- ````
322
-
323
327
(default: {})
324
328
325
-
326
329
## Logging
327
330
328
331
Scrubber uses the default django logger. The logger name is `` django_scrubber.scrubbers `` .
0 commit comments