django_prbac Package

django_prbac Package

admin Module

arbitrary Module

decorators Module

exceptions Module

exception django_prbac.exceptions.PermissionDenied[source]

Bases: Exception

fields Module

class django_prbac.fields.StringListField(*args, db_collation=None, **kwargs)[source]

Bases: django.db.models.fields.TextField

A Django field for lists of strings

formfield(**kwargs)[source]

The default form field is a StringListFormField.

from_db_value(value, expression, connection, *args, **kwargs)[source]
get_prep_value(value)[source]

Converts the value, which must be a string list, to a comma-separated string, quoted appropriately. This format is private to the field type so it is not exposed for customization or any such thing.

is_string_list(value)[source]
to_python(value)[source]

Best-effort conversion of “any value” to a string list.

It does not try that hard, because curious values probably indicate a mistake and we should fail early.

value_to_string(obj)[source]

Return a string value of this field from the passed obj. This is used by the serialization framework.

class django_prbac.fields.StringSetField(*args, db_collation=None, **kwargs)[source]

Bases: django_prbac.fields.StringListField

A Django field for set of strings.

from_db_value(value, expression, connection, *args, **kwargs)[source]
get_prep_value(value)[source]

Converts the value, which must be a string list, to a comma-separated string, quoted appropriately. This format is private to the field type so it is not exposed for customization or any such thing.

is_string_set(value)[source]
to_python(value)[source]

Best-effort conversion of “any value” to a string set. Mostly strict, but a bit lenient to allow lists to be passed in by form fields.

value_to_string(obj)[source]

Return a string value of this field from the passed obj. This is used by the serialization framework.

mock_settings Module

Settings just for running the django-prbac tests or checking out the admin site.

models Module

urls Module