Skip to content

Commit 3f8527e

Browse files
committed
describe configuration settings in readme
1 parent d94e7db commit 3f8527e

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,32 @@ def hello(request):
6464
pass
6565
```
6666

67+
## Configuration
68+
69+
### `CASBIN_MODEL`
70+
A string containing the file location of your casbin model.
71+
72+
### `CASBIN_LOG_ENABLED`
73+
If `True`, enables logging. `False` by default.
74+
75+
### `CASBIN_ADAPTER`
76+
A string containing the adapter import path. Defaults to the django adapter shipped with this package: `casbin_adapter.adapter.Adapter`
77+
78+
### `CASBIN_ADAPTER_ARGS`
79+
A tuple of arguments to be passed into the constructor of the adapter specified
80+
in `CASBIN_ADAPTER`. Refer to adapters to see available arguments.
81+
82+
E.g. if you wish to use the file adapter
83+
set the adapter to `casbin.persist.adapters.FileAdapter` and use
84+
`CASBIN_ADAPTER_ARGS = ('path/to/policy_file.csv',)`
85+
86+
### `CASBIN_WATCHER`
87+
Watcher instance to be set as the watcher on the enforcer instance.
88+
89+
### `CASBIN_ROLE_MANAGER`
90+
Role manager instance to be set as the role manager on the enforcer instance.
91+
92+
6793
### Getting Help
6894

6995
- [PyCasbin](https://github.com/casbin/pycasbin)

0 commit comments

Comments
 (0)