Debian Codegraph @

guardian/management/commands/clean_orphan_obj_perms.py

raw symbols SCIP
1 from django.core.management.basescip-python python Django 5.2.15 `django.core.management.base`/__init__: import BaseCommand
2
3 from guardian.utilsscip-python python django-guardian 2.4.0 `guardian.utils`/__init__: import clean_orphan_obj_permsscip-python python django-guardian 2.4.0 `guardian.utils`/clean_orphan_obj_perms().
4
5
6 class Commandscip-python python django-guardian 2.4.0 `guardian.management.commands.clean_orphan_obj_perms`/Command#(BaseCommand):
7 """
8 clean_orphan_obj_perms command is a tiny wrapper around
9 :func:`guardian.utils.clean_orphan_obj_perms`.
10
11 Usage::
12
13 $ python manage.py clean_orphan_obj_perms
14 Removed 11 object permission entries with no targets
15
16 """
17 helpscip-python python django-guardian 2.4.0 `guardian.management.commands.clean_orphan_obj_perms`/Command#help. = "Removes object permissions with not existing targets"
18
19 def handlescip-python python django-guardian 2.4.0 `guardian.management.commands.clean_orphan_obj_perms`/Command#handle().(selfscip-python python django-guardian 2.4.0 `guardian.management.commands.clean_orphan_obj_perms`/Command#handle().(self), **optionsscip-python python django-guardian 2.4.0 `guardian.management.commands.clean_orphan_obj_perms`/Command#handle().(options)):
20 removed = clean_orphan_obj_permsscip-python python django-guardian 2.4.0 `guardian.utils`/clean_orphan_obj_perms().()
21 if optionsscip-python python django-guardian 2.4.0 `guardian.management.commands.clean_orphan_obj_perms`/Command#handle().(options)['verbosity'] > 0:
22 printscip-python python python-stdlib 3.11 builtins/print().("Removed %d object permission entries with no targets" %
23 removed)