Module ImportFrom alias alias ImportFrom alias ImportFrom alias alias ImportFrom alias ImportFrom alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Call NameLoad Assign AttributeStore NameLoad attr Call NameLoad keyword Str keyword NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Return Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad NameLoad AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad Str Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore Dict Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str keyword Str keyword Str Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad If Call NameLoad AttributeLoad NameLoad attr Str body Delete AttributeDel AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str keyword Str keyword Str Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad Assign NameStore Call NameLoad NameLoad AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad Str Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore Dict Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad Str Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str keyword Str Assign NameStore Dict Str Str Str NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str keyword Str keyword Str Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad If Call NameLoad AttributeLoad NameLoad attr Str body Delete AttributeDel AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad Str Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore Dict Str Str Str NameLoad AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str keyword Str keyword Str Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str keyword Str keyword Str Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad If Call NameLoad AttributeLoad NameLoad attr Str body Delete AttributeDel AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad NameLoad AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad Str Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str keyword Str Assign NameStore Dict Str Str NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str keyword Str keyword Str Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad If Call NameLoad AttributeLoad NameLoad attr Str body Delete AttributeDel AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Str decorator_list decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Call NameLoad Call AttributeLoad NameLoad attr keyword Str Num decorator_list decorator_list
N/A django.contrib.auth.models User Permission django.core.urlresolvers reverse django.template Template Context django.test TestCase django.test.client RequestFactory N/A djadmin2 djadmin2 ModelAdmin2 djadmin2.permissions TemplatePermissionChecker blog.models Post TemplatePermissionTest N/A TestCase N/A setUp N/A N/A self N/A N/A N/A N/A self factory N/A RequestFactory N/A N/A self user N/A User username admin is_staff True N/A N/A N/A N/A self user set_password admin N/A N/A N/A N/A self user save N/A render N/A N/A self template context N/A N/A N/A template N/A Template template N/A context N/A Context context N/A N/A N/A template render context N/A test_permission_wrapper N/A N/A self N/A N/A N/A model_admin N/A ModelAdmin2 Post N/A djadmin2 default N/A request N/A N/A N/A self factory get N/A reverse admin2:blog_post_index N/A N/A request user N/A self user N/A permissions N/A TemplatePermissionChecker request model_admin N/A context N/A permissions permissions N/A result N/A N/A self render {{ permissions.has_unvalid_permission }} context N/A N/A N/A self assertEqual result N/A result N/A N/A self render {{ permissions.has_add_permission }} context N/A N/A N/A self assertEqual result False N/A post_add_permission N/A N/A N/A Permission objects get content_type__app_label blog content_type__model post codename add_post N/A N/A N/A N/A N/A self user user_permissions add post_add_permission N/A N/A hasattr N/A self user _perm_cache N/A N/A N/A N/A self user _perm_cache N/A result N/A N/A self render {{ permissions.has_add_permission }} context N/A N/A N/A self assertEqual result True N/A test_admin_traversal_by_name N/A N/A self N/A N/A N/A post_add_permission N/A N/A N/A Permission objects get content_type__app_label blog content_type__model post codename add_post N/A N/A N/A N/A N/A self user user_permissions add post_add_permission N/A model_admin N/A ModelAdmin2 Post N/A djadmin2 default N/A request N/A N/A N/A self factory get N/A reverse admin2:blog_post_index N/A N/A request user N/A self user N/A permissions N/A TemplatePermissionChecker request model_admin N/A context N/A permissions permissions N/A result N/A N/A self render {{ permissions.has_add_permission }} context N/A N/A N/A self assertEqual result True N/A result N/A N/A self render {{ permissions.blog_post.has_add_permission }} context N/A N/A N/A self assertEqual result True N/A result N/A N/A self render {{ permissions.blog_post.has_change_permission }} context N/A N/A N/A self assertEqual result False N/A result N/A N/A self render {{ permissions.auth_user.has_delete_permission }} context N/A N/A N/A self assertEqual result False N/A result N/A N/A self render {{ permissions.unknown_app.has_add_permission }} context N/A N/A N/A self assertEqual result N/A result N/A N/A self render {{ permissions.blog_post.has_unvalid_permission }} context N/A N/A N/A self assertEqual result N/A test_admin_binding N/A N/A self N/A N/A N/A user_admin N/A N/A N/A djadmin2 default get_admin_by_name auth_user N/A post_admin N/A N/A N/A djadmin2 default get_admin_by_name blog_post N/A request N/A N/A N/A self factory get N/A reverse admin2:auth_user_index N/A N/A request user N/A self user N/A permissions N/A TemplatePermissionChecker request user_admin N/A post N/A N/A N/A Post objects create title Hello body world N/A context N/A post post_admin permissions post post_admin permissions N/A result N/A N/A self render {% load admin2_tags %}{{ permissions|for_admin:post_admin }} context N/A N/A N/A self assertEqual result N/A result N/A N/A self render {% load admin2_tags %}{{ permissions.has_add_permission }}{% with permissions|for_admin:post_admin as permissions %}{{ permissions.has_add_permission }}{% endwith %} context N/A N/A N/A self assertEqual result FalseFalse N/A post_add_permission N/A N/A N/A Permission objects get content_type__app_label blog content_type__model post codename add_post N/A N/A N/A N/A N/A self user user_permissions add post_add_permission N/A N/A hasattr N/A self user _perm_cache N/A N/A N/A N/A self user _perm_cache N/A result N/A N/A self render {% load admin2_tags %}{{ permissions.has_add_permission }}{% with permissions|for_admin:post_admin as permissions %}{{ permissions.has_add_permission }}{% endwith %}{{ permissions.blog_post.has_add_permission }} context N/A N/A N/A self assertEqual result FalseTrueTrue N/A result N/A N/A self render {% load admin2_tags %}{% with permissions|for_admin:"blog_post" as permissions %}{{ permissions.has_add_permission }}{% endwith %} context N/A N/A N/A self assertEqual result True N/A result N/A N/A self render {% load admin2_tags %}{% with permissions|for_admin:"invalid_admin_name" as permissions %}{{ permissions.has_add_permission }}{% endwith %} context N/A N/A N/A self assertEqual result N/A test_view_binding N/A N/A self N/A N/A N/A user_admin N/A N/A N/A djadmin2 default get_admin_by_name auth_user N/A post_admin N/A N/A N/A djadmin2 default get_admin_by_name blog_post N/A request N/A N/A N/A self factory get N/A reverse admin2:auth_user_index N/A N/A request user N/A self user N/A permissions N/A TemplatePermissionChecker request user_admin N/A context N/A post_admin post_add_view permissions post_admin N/A post_admin create_view permissions N/A result N/A N/A self render {% load admin2_tags %}{{ permissions|for_view:"add" }} context N/A N/A N/A self assertEqual result False N/A result N/A N/A self render {% load admin2_tags %}{{ permissions|for_view:post_add_view }} context N/A N/A N/A self assertEqual result N/A result N/A N/A self render {% load admin2_tags %}{{ permissions.has_add_permission }}{% with permissions|for_admin:"blog_post"|for_view:"add" as post_add_perm %}{{ post_add_perm }}{% endwith %} context N/A N/A N/A self assertEqual result FalseFalse N/A post_add_permission N/A N/A N/A Permission objects get content_type__app_label blog content_type__model post codename add_post N/A N/A N/A N/A N/A self user user_permissions add post_add_permission N/A user_change_permission N/A N/A N/A Permission objects get content_type__app_label auth content_type__model user codename change_user N/A N/A N/A N/A N/A self user user_permissions add user_change_permission N/A N/A hasattr N/A self user _perm_cache N/A N/A N/A N/A self user _perm_cache N/A result N/A N/A self render {% load admin2_tags %}{{ permissions.has_add_permission }}{% with permissions|for_admin:"blog_post"|for_view:"add" as post_add_perm %}{{ post_add_perm }}{% endwith %}{{ permissions|for_view:"change" }} context N/A N/A N/A self assertEqual result FalseTrueTrue N/A result N/A N/A self render {% load admin2_tags %}{% with permissions|for_view:"change" as user_change_perm %}1{{ user_change_perm }}2{{ user_change_perm|for_view:"add" }}3{{ user_change_perm|for_admin:"blog_post" }}4{{ user_change_perm|for_admin:"blog_post"|for_view:"add" }}{% endwith %} context N/A N/A N/A self assertEqual result 1True2False34True N/A test_object_level_permission N/A N/A self N/A N/A N/A model_admin N/A ModelAdmin2 Post N/A djadmin2 default N/A request N/A N/A N/A self factory get N/A reverse admin2:blog_post_index N/A N/A request user N/A self user N/A permissions N/A TemplatePermissionChecker request model_admin N/A post N/A N/A N/A Post objects create title Hello body world N/A context N/A post permissions post permissions N/A result N/A N/A self render {% load admin2_tags %}{{ permissions.has_unvalid_permission|for_object:post }} context N/A N/A N/A self assertEqual result N/A result N/A N/A self render {% load admin2_tags %}{{ permissions.has_add_permission|for_object:post }} context N/A N/A N/A self assertEqual result False N/A post_add_permission N/A N/A N/A Permission objects get content_type__app_label blog content_type__model post codename add_post N/A N/A N/A N/A N/A self user user_permissions add post_add_permission N/A N/A hasattr N/A self user _perm_cache N/A N/A N/A N/A self user _perm_cache N/A result N/A N/A self render {% load admin2_tags %}{{ permissions.has_add_permission }}{{ permissions.has_add_permission|for_object:post }} context N/A N/A N/A self assertEqual result TrueFalse N/A result N/A N/A self render {% load admin2_tags %}{{ permissions.has_add_permission }}{% with permissions|for_object:post as permissions %}{{ permissions.has_add_permission }}{% endwith %} context N/A N/A N/A self assertEqual result TrueFalse N/A N/A ViewPermissionTest N/A TestCase N/A test_view_permission_was_created N/A N/A self N/A N/A N/A permissions N/A N/A N/A Permission objects filter content_type__app_label blog content_type__model post N/A N/A N/A self assertEqual N/A len N/A N/A permissions filter codename view_post 1 N/A N/A