Module ImportFrom alias ImportFrom alias identifier ImportFrom alias ImportFrom alias ImportFrom alias alias ImportFrom alias ImportFrom alias alias ImportFrom alias ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad If UnaryOpNot AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr BinOpMod Str Call AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad NameLoad attr If CompareIs AttributeLoad NameLoad attr NameLoad body Assign AttributeStore NameLoad attr ListLoad Assign AttributeStore NameLoad attr ListComp Call AttributeLoad NameLoad attr comprehension NameStore AttributeLoad NameLoad attr Return NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str Assign NameStore NameLoad Assign NameStore TupleLoad Assign NameStore NameLoad Assign NameStore ListLoad Str Str Str Str FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad NameLoad vararg kwarg body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If UnaryOpNot AttributeLoad NameLoad attr body Return TupleLoad Dict Dict Assign NameStore Call NameLoad Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Str keyword NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr BinOpBitOr Call NameLoad keyword AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad keyword NameLoad Assign NameStore Dict Assign NameStore Dict For NameStore NameLoad body If CompareEq AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr body Assign SubscriptStore NameLoad Index TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad orelse Assign SubscriptStore NameLoad Index TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Return TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If UnaryOpNot AttributeLoad NameLoad attr body Return Dict Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword AttributeLoad NameLoad attr Assign NameStore Dict For NameStore NameLoad body Assign SubscriptStore NameLoad Index TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If UnaryOpNot AttributeLoad NameLoad attr body Return Dict Assign NameStore Call NameLoad AttributeLoad NameLoad attr Str NameLoad If NameLoad body Return AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Return AttributeLoad AttributeLoad NameLoad attr attr decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Str If UnaryOpNot AttributeLoad NameLoad attr body Return Dict Assign NameStore Call NameLoad AttributeLoad NameLoad attr Str NameLoad If NameLoad body Return AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Return AttributeLoad AttributeLoad NameLoad attr attr decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Str If UnaryOpNot AttributeLoad NameLoad attr body Return Dict Assign NameStore Call NameLoad AttributeLoad NameLoad attr Str NameLoad If NameLoad body Return AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Return AttributeLoad AttributeLoad NameLoad attr attr decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Str If AttributeLoad NameLoad attr body Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad If AttributeLoad NameLoad attr body Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad NameLoad Str NameLoad Return BoolOpAnd BoolOpOr AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad body If UnaryOpNot AttributeLoad NameLoad attr body Return NameLoad If AttributeLoad AttributeLoad NameLoad attr attr body Return NameLoad If UnaryOpNot AttributeLoad AttributeLoad NameLoad attr attr body Return NameLoad If AttributeLoad NameLoad attr body Assign NameStore AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad attr FunctionDef arguments args NameParam defaults body Return Call AttributeLoad NameLoad attr TupleLoad AttributeLoad NameLoad attr NameLoad NameLoad NameLoad decorator_list If Call NameLoad AttributeLoad NameLoad attr body Return NameLoad If NameLoad body Return Call NameLoad AttributeLoad NameLoad attr Return NameLoad Return Call AttributeLoad Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad attr keyword AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str If UnaryOpNot AttributeLoad NameLoad attr body Return NameLoad If AttributeLoad NameLoad attr body Assign NameStore AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad attr FunctionDef arguments args NameParam defaults body Return Call AttributeLoad NameLoad attr TupleLoad AttributeLoad NameLoad attr NameLoad NameLoad NameLoad decorator_list Return Call NameLoad AttributeLoad NameLoad attr Return Call AttributeLoad Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr NameLoad NameLoad NameLoad attr keyword AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str If AttributeLoad NameLoad attr body If Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad body Return NameLoad If AttributeLoad NameLoad attr body Return Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad body Expr Str Return Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad vararg kwarg body If UnaryOpNot NameLoad body Assign NameStore ListLoad AttributeLoad NameLoad attr Assign NameStore NameLoad For NameStore NameLoad body If UnaryOpNot Call NameLoad NameLoad TupleLoad NameLoad NameLoad body Continue If AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Assign NameStore BoolOpOr NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad If BoolOpAnd UnaryOpNot Call NameLoad NameLoad NameLoad Call NameLoad NameLoad AttributeLoad NameLoad attr body Assign NameStore BoolOpOr NameLoad Call AttributeLoad NameLoad attr NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body If NameLoad body Assign NameStore NameLoad orelse Assign NameStore BinOpMod Str TupleLoad AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr If NameLoad body Assign NameStore BinOpMod Str TupleLoad NameLoad Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad body Assign NameStore BinOpMod Str TupleLoad AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr If NameLoad body Assign NameStore BinOpMod Str TupleLoad NameLoad Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad body Expr Str Assign NameStore ListLoad If UnaryOpNot NameLoad body Assign NameStore TupleLoad AttributeLoad NameLoad attr orelse If UnaryOpNot Call NameLoad NameLoad TupleLoad NameLoad NameLoad body Assign NameStore TupleLoad NameLoad orelse Assign NameStore NameLoad If UnaryOpNot NameLoad body Assign NameStore BinOpAdd AttributeLoad NameLoad attr Call NameLoad NameLoad Str ListLoad orelse If UnaryOpNot Call NameLoad NameLoad TupleLoad NameLoad NameLoad body Assign NameStore TupleLoad NameLoad orelse Assign NameStore NameLoad For NameStore NameLoad body If UnaryOpNot Call NameLoad NameLoad TupleLoad NameLoad NameLoad body Raise Call NameLoad NameLoad orelse If BoolOpAnd Call NameLoad NameLoad NameLoad UnaryOpNot AttributeLoad NameLoad attr body Raise Call NameLoad NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad For NameStore NameLoad body If Call NameLoad NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad TryExcept body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad keyword NameLoad keyword AttributeLoad NameLoad attr handlers ExceptHandler type AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad orelse If Call NameLoad NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad keyword NameLoad TryExcept body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad handlers ExceptHandler type AttributeLoad NameLoad attr body Assign NameStore NameLoad If CompareIn Str NameLoad body Assign NameStore SubscriptLoad NameLoad Slice Num Call AttributeLoad NameLoad attr Str Assign NameStore Call NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list decorator_list
N/A django.conf settings django.contrib.auth.models Permission DjangoPermission django.contrib.contenttypes.models ContentType django.db.models Q django.db.models.base Model ModelBase django.template.defaultfilters slugify authority.exceptions NotAModel UnsavedModelInstance authority.models Permission PermissionMetaclass N/A type N/A N/A 
    Used to generate the default set of permission checks "add", "change" and
    "delete".
     __new__ N/A N/A cls name bases attrs N/A N/A N/A new_class N/A N/A N/A super PermissionMetaclass cls __new__ cls name bases attrs N/A N/A N/A new_class label N/A N/A N/A new_class label N/A %s_permission N/A N/A N/A new_class __name__ lower N/A N/A new_class label N/A slugify N/A new_class label N/A N/A N/A new_class checks None N/A N/A N/A new_class checks N/A N/A N/A new_class checks N/A N/A N/A check lower N/A check N/A new_class checks N/A new_class N/A N/A BasePermission N/A object N/A N/A 
    Base Permission class to be used to define app permissions.
     N/A __metaclass__ PermissionMetaclass N/A checks N/A N/A label None N/A generic_checks N/A add browse change delete __init__ N/A N/A self user group N/A None None args kwargs N/A N/A N/A self user user N/A N/A self group group N/A N/A N/A N/A super BasePermission self __init__ args kwargs N/A _get_user_cached_perms N/A N/A self N/A N/A N/A 
        Set up both the user and group caches.
         N/A N/A N/A self user N/A N/A N/A N/A N/A N/A group_pks N/A set N/A N/A N/A N/A self user groups values_list pk flat True N/A perms N/A N/A N/A Permission objects filter N/A N/A Q user__pk N/A N/A self user pk N/A Q group__pk__in group_pks N/A user_permissions N/A N/A group_permissions N/A N/A perm perms N/A N/A N/A N/A perm user_id N/A N/A self user pk N/A N/A N/A user_permissions N/A N/A N/A perm object_id N/A perm content_type_id N/A perm codename N/A perm approved True N/A N/A N/A group_permissions N/A N/A N/A perm object_id N/A perm content_type_id N/A perm codename N/A perm approved True N/A N/A user_permissions group_permissions N/A _get_group_cached_perms N/A N/A self N/A N/A N/A 
        Set group cache.
         N/A N/A N/A self group N/A N/A N/A N/A perms N/A N/A N/A Permission objects filter group N/A self group N/A group_permissions N/A N/A perm perms N/A N/A N/A group_permissions N/A N/A N/A perm object_id N/A perm content_type_id N/A perm codename N/A perm approved True N/A group_permissions N/A _prime_user_perm_caches N/A N/A self N/A N/A N/A 
        Prime both the user and group caches and put them on the ``self.user``.
        In addition add a cache filled flag on ``self.user``.
         N/A N/A perm_cache group_perm_cache N/A N/A self _get_user_cached_perms N/A N/A N/A self user _authority_perm_cache perm_cache N/A N/A N/A self user _authority_group_perm_cache group_perm_cache N/A N/A N/A self user _authority_perm_cache_filled True N/A _prime_group_perm_caches N/A N/A self N/A N/A N/A 
        Prime the group cache and put them on the ``self.group``.
        In addition add a cache filled flag on ``self.group``.
         N/A perm_cache N/A N/A self _get_group_cached_perms N/A N/A N/A self group _authority_perm_cache perm_cache N/A N/A N/A self group _authority_perm_cache_filled True N/A _user_perm_cache N/A N/A self N/A N/A N/A 
        cached_permissions will generate the cache in a lazy fashion.
         N/A N/A N/A self user N/A N/A N/A N/A cache_filled N/A getattr N/A self user _authority_perm_cache_filled False N/A cache_filled N/A N/A N/A N/A self user _authority_perm_cache N/A N/A N/A self _prime_user_perm_caches N/A N/A N/A self user _authority_perm_cache N/A property _group_perm_cache N/A N/A self N/A N/A N/A 
        cached_permissions will generate the cache in a lazy fashion.
         N/A N/A N/A self group N/A N/A N/A N/A cache_filled N/A getattr N/A self group _authority_perm_cache_filled False N/A cache_filled N/A N/A N/A N/A self group _authority_perm_cache N/A N/A N/A self _prime_group_perm_caches N/A N/A N/A self group _authority_perm_cache N/A property _user_group_perm_cache N/A N/A self N/A N/A N/A 
        cached_permissions will generate the cache in a lazy fashion.
         N/A N/A N/A self user N/A N/A N/A N/A cache_filled N/A getattr N/A self user _authority_perm_cache_filled False N/A cache_filled N/A N/A N/A N/A self user _authority_group_perm_cache N/A N/A N/A self _prime_user_perm_caches N/A N/A N/A self user _authority_group_perm_cache N/A property invalidate_permissions_cache N/A N/A self N/A N/A N/A 
        In the event that the Permission table is changed during the use of a
        permission the Permission cache will need to be invalidated and
        regenerated. By calling this method the invalidation will occur, and
        the next time the cached_permissions is used the cache will be
        re-primed.
         N/A N/A self user N/A N/A N/A N/A self user _authority_perm_cache_filled False N/A N/A self group N/A N/A N/A N/A self group _authority_perm_cache_filled False N/A use_smart_cache N/A N/A self N/A N/A N/A use_smart_cache N/A getattr settings AUTHORITY_USE_SMART_CACHE True N/A N/A N/A N/A self user N/A self group use_smart_cache N/A property has_user_perms N/A N/A self perm obj approved check_groups N/A True N/A N/A N/A N/A self user N/A N/A False N/A N/A N/A self user is_superuser N/A N/A True N/A N/A N/A N/A self user is_active N/A N/A False N/A N/A self use_smart_cache N/A N/A content_type_pk N/A N/A N/A N/A Permission objects get_content_type obj pk _user_has_perms N/A N/A cached_perms N/A N/A N/A N/A N/A cached_perms get N/A N/A obj pk content_type_pk perm approved N/A N/A N/A _user_has_perms N/A self _user_perm_cache N/A N/A True N/A check_groups N/A N/A N/A _user_has_perms N/A self _user_group_perm_cache N/A False N/A N/A N/A N/A N/A N/A N/A N/A Permission objects user_permissions N/A self user perm obj approved check_groups filter object_id N/A obj pk exists N/A has_group_perms N/A N/A self perm obj approved N/A N/A N/A 
        Check if group has the permission for the given object
         N/A N/A N/A self group N/A N/A False N/A N/A self use_smart_cache N/A N/A content_type_pk N/A N/A N/A N/A Permission objects get_content_type obj pk _group_has_perms N/A N/A cached_perms N/A N/A N/A N/A N/A cached_perms get N/A N/A obj pk content_type_pk perm approved N/A N/A N/A _group_has_perms N/A self _group_perm_cache N/A N/A N/A N/A N/A N/A N/A N/A Permission objects group_permissions N/A self group perm obj approved filter object_id N/A obj pk exists N/A has_perm N/A N/A self perm obj check_groups approved N/A True True N/A N/A 
        Check if user has the permission for the given object
         N/A N/A self user N/A N/A N/A N/A self has_user_perms perm obj approved check_groups N/A N/A True N/A N/A self group N/A N/A N/A N/A self has_group_perms perm obj approved N/A False N/A requested_perm N/A N/A self perm obj check_groups N/A True N/A N/A 
        Check if user requested a permission for the given object
         N/A N/A N/A self has_perm perm obj check_groups False N/A can N/A N/A self check generic N/A False args kwargs N/A N/A N/A args N/A N/A args N/A N/A self model N/A perms False N/A obj args N/A N/A N/A N/A isinstance obj N/A ModelBase Model N/A N/A N/A N/A self user N/A N/A perm N/A N/A self get_django_codename check obj generic N/A perms N/A perms N/A N/A N/A self user has_perm perm N/A perm N/A N/A self get_codename check obj generic N/A N/A N/A N/A isinstance obj ModelBase N/A isinstance obj N/A self model N/A N/A perms N/A perms N/A N/A self has_perm perm obj N/A perms N/A get_django_codename N/A N/A self check model_or_instance generic without_left N/A False False N/A N/A without_left N/A N/A perm check N/A N/A perm N/A %s.%s N/A N/A N/A model_or_instance _meta app_label N/A N/A check lower N/A generic N/A N/A perm N/A %s_%s N/A perm N/A N/A N/A N/A model_or_instance _meta object_name lower N/A perm N/A get_codename N/A N/A self check model_or_instance generic N/A False N/A N/A perm N/A %s.%s N/A N/A self label N/A N/A check lower N/A generic N/A N/A perm N/A %s_%s N/A perm N/A N/A N/A N/A model_or_instance _meta object_name lower N/A perm N/A assign N/A N/A self check content_object generic N/A None None False N/A N/A 
        Assign a permission to a user.

        To assign permission for all checks: let check=None.
        To assign permission for all objects: let content_object=None.

        If generic is True then "check" will be suffixed with _modelname.
         N/A result N/A N/A N/A content_object N/A N/A content_objects N/A N/A self model N/A N/A N/A N/A isinstance content_object N/A list tuple N/A N/A content_objects N/A content_object N/A N/A content_objects content_object N/A N/A check N/A N/A checks N/A N/A self generic_checks N/A getattr self checks N/A N/A N/A N/A N/A isinstance check N/A list tuple N/A N/A checks N/A check N/A N/A checks check N/A content_object content_objects N/A N/A N/A N/A isinstance content_object N/A Model ModelBase N/A N/A N/A NotAModel content_object N/A N/A N/A N/A isinstance content_object Model N/A N/A content_object pk N/A N/A N/A UnsavedModelInstance content_object N/A content_type N/A N/A N/A ContentType objects get_for_model content_object N/A check checks N/A N/A N/A isinstance content_object Model N/A N/A codename N/A N/A self get_codename check content_object generic N/A N/A N/A perm N/A N/A N/A Permission objects get user N/A self user codename codename approved True content_type content_type object_id N/A content_object pk N/A N/A N/A N/A Permission DoesNotExist N/A N/A perm N/A N/A N/A Permission objects create user N/A self user content_object content_object codename codename approved True N/A N/A N/A result append perm N/A N/A N/A isinstance content_object ModelBase N/A N/A codename N/A N/A self get_django_codename check content_object generic without_left True N/A N/A N/A perm N/A N/A N/A DjangoPermission objects get codename codename N/A N/A N/A N/A DjangoPermission DoesNotExist N/A N/A name check N/A N/A _ name N/A N/A name N/A name N/A 0 N/A N/A name find _ N/A perm N/A DjangoPermission name name codename codename content_type content_type N/A N/A N/A perm save N/A N/A N/A N/A N/A self user user_permissions add perm N/A N/A N/A result append perm N/A result N/A N/A