package documentation

Creates permissions for all installed apps that need permissions.

Package commands No package docstring; 1/2 module documented

From __init__.py:

Function create_permissions Undocumented
Function get_default_username Try to determine the current system user's username to use as a default.
Function get_system_username Return the current system user's username, or an empty string if the username could not be determined.
Function _get_all_permissions Return (codename, name) for all permissions in the given opts.
Function _get_builtin_permissions Return (codename, name) for all autogenerated permissions. By default, this is ('add', 'change', 'delete', 'view')
def _get_all_permissions(opts): (source)

Return (codename, name) for all permissions in the given opts.

def _get_builtin_permissions(opts): (source)

Return (codename, name) for all autogenerated permissions. By default, this is ('add', 'change', 'delete', 'view')

def create_permissions(app_config, verbosity=2, interactive=True, using=DEFAULT_DB_ALIAS, apps=global_apps, **kwargs): (source)

Undocumented

def get_system_username(): (source)

Return the current system user's username, or an empty string if the username could not be determined.

def get_default_username(check_db=True, database=DEFAULT_DB_ALIAS): (source)

Try to determine the current system user's username to use as a default. :param check_db: If ``True``, requires that the username does not match an existing ``auth.User`` (otherwise returns an empty string). :param database: The database where the unique check will be performed. :returns: The username, or an empty string if no username can be determined or the suggested username is already taken.