django-content-settings
django-content-settings copied to clipboard
binary instead of simple string for illustrating that this string should be converted into function
Current (0.19) version: callable attributes can be set as string
fetch_permission: TCallableStr = "none"
update_permission: TCallableStr = "staff"
view_permission: TCallableStr = "staff"
so the function that parses that attribute knows where to get a callable object instead.
But as an option you can use binary object, and b prefix to the string would illustrate that this will become an object
fetch_permission: TCallableStr = b"none"
update_permission: TCallableStr = b"staff"
view_permission: TCallableStr = b"staff"
in the future we will use binary value to convert not only functions