Module Expr Str ImportFrom alias alias ImportFrom alias ImportFrom alias ImportFrom alias alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias TryExcept body ImportFrom alias handlers ExceptHandler type NameLoad body ImportFrom alias identifier FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad FunctionDef arguments args NameParam defaults body Assign NameStore CompareIn AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore BinOpMod Str TupleLoad Call NameLoad AttributeLoad NameLoad attr Call NameLoad NameLoad If NameLoad body TryExcept body Assign NameStore Call NameLoad BinOpMod Str TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad TupleLoad Call NameLoad Call AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad body Return NameLoad Assign NameStore BinOpMod Str TupleLoad AttributeLoad NameLoad attr Call NameLoad Str NameLoad If UnaryOpNot Call AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Return Call NameLoad Str Call NameLoad AttributeLoad NameLoad attr NameLoad NameLoad orelse Return NameLoad decorator_list Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore ListComp Call NameLoad NameLoad comprehension NameStore AttributeLoad NameLoad attr Assign NameStore DictComp AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad NameLoad comprehension TupleStore NameStore NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Return TupleLoad NameLoad NameLoad NameLoad NameLoad decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults vararg kwarg body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad NameLoad Assign AttributeStore NameLoad attr Dict Assign AttributeStore NameLoad attr Call NameLoad Assign AttributeStore NameLoad attr Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad ListLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad kwarg body For NameStore NameLoad body If BoolOpAnd NameLoad UnaryOpNot Call AttributeLoad NameLoad attr Str body Assign NameStore BinOpMod NameLoad Dict Str Str AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad NameLoad NameLoad orelse Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad TryExcept body Return Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad keyword NameLoad NameLoad handlers ExceptHandler type AttributeLoad NameLoad attr name NameStore body Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad NameLoad Return Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body If CompareIn NameLoad NameLoad body Return ListLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore ListLoad For NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad TupleLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad If NameLoad body Assign NameStore ListLoad Call NameLoad NameLoad orelse Assign NameStore ListLoad NameLoad If NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str Assign NameStore Call NameLoad Assign NameStore ListLoad For NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad TupleLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults vararg kwarg body Expr Str Return NameLoad decorator_list decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad kwarg body If Call NameLoad NameLoad Str body Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr attr Return Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad keyword NameLoad NameLoad decorator_list decorator_list
N/A N/A 
Copy of ``django.contrib.admin.utils.get_deleted_objects`` and a subclass of
``django.contrib.admin.utils.NestedObjects`` that work with djongo_polymorphic
querysets.
Ultimatly these should go directly into django_polymorphic or, in a more
generic way, into django itself.

This code has been copied from Django 1.9.4.

At all locations where something has been changed, there are inline comments
in the code.
 __future__ absolute_import unicode_literals collections defaultdict django.contrib.auth get_permission_codename django.core.urlresolvers NoReverseMatch reverse django.db models django.db.models.deletion Collector django.utils.html format_html django.utils.text capfirst utils.compatibility quote N/A N/A django.utils.encoding force_text N/A N/A N/A ImportError N/A django.utils.encoding force_unicode force_text get_deleted_objects N/A N/A objs opts user admin_site using N/A N/A N/A 
    Find all objects related to ``objs`` that should also be deleted. ``objs``
    must be a homogeneous iterable of objects (e.g. a QuerySet).
    Returns a nested list of strings suitable for display in the
    template with the ``unordered_list`` filter.
     N/A collector N/A PolymorphicAwareNestedObjects using using N/A N/A N/A collector collect objs N/A perms_needed N/A set format_callback N/A N/A obj N/A N/A N/A has_admin N/A N/A obj __class__ N/A admin_site _registry N/A opts N/A obj _meta N/A no_edit_link N/A %s: %s N/A N/A capfirst N/A opts verbose_name N/A force_text obj N/A has_admin N/A N/A N/A N/A admin_url N/A reverse N/A %s:%s_%s_change N/A N/A admin_site name N/A opts app_label N/A opts model_name None N/A N/A quote N/A N/A obj _get_pk_val N/A N/A N/A NoReverseMatch N/A N/A no_edit_link N/A p N/A %s.%s N/A N/A opts app_label N/A get_permission_codename delete opts N/A N/A N/A N/A user has_perm p N/A N/A N/A N/A perms_needed add N/A opts verbose_name N/A N/A format_html {}: <a href="{}">{}</a> N/A capfirst N/A opts verbose_name admin_url obj N/A N/A no_edit_link N/A N/A to_delete N/A N/A collector nested format_callback N/A protected N/A N/A format_callback obj N/A obj N/A collector protected N/A model_count N/A N/A N/A model _meta verbose_name_plural N/A len objs N/A N/A model objs N/A N/A N/A collector model_objs items N/A N/A to_delete model_count perms_needed protected N/A NestedObjects N/A Collector N/A __init__ N/A N/A self N/A args kwargs N/A N/A N/A N/A N/A super NestedObjects self __init__ args kwargs N/A N/A self edges N/A N/A N/A self protected N/A set N/A N/A self model_objs N/A defaultdict set N/A add_edge N/A N/A self source target N/A N/A N/A N/A N/A N/A N/A N/A self edges setdefault source N/A append target N/A collect N/A N/A self objs source source_attr N/A None None kwargs N/A N/A obj objs N/A N/A N/A source_attr N/A N/A N/A source_attr endswith + N/A N/A related_name N/A source_attr N/A class app_label N/A N/A source _meta model_name N/A N/A source _meta app_label N/A N/A N/A self add_edge N/A getattr obj related_name obj N/A N/A N/A N/A self add_edge None obj N/A N/A N/A N/A N/A self model_objs N/A N/A N/A obj _meta model add obj N/A N/A N/A N/A N/A N/A super NestedObjects self collect objs source_attr source_attr kwargs N/A N/A N/A N/A models ProtectedError N/A e N/A N/A N/A N/A N/A self protected update N/A e protected_objects N/A related_objects N/A N/A self related objs N/A N/A N/A qs N/A N/A N/A super NestedObjects self related_objects related objs N/A N/A N/A qs select_related N/A N/A related field name N/A _nested N/A N/A self obj seen format_callback N/A N/A N/A N/A obj seen N/A N/A N/A N/A N/A N/A seen add obj N/A children N/A N/A child N/A N/A N/A self edges get obj N/A N/A N/A N/A N/A children extend N/A N/A self _nested child seen format_callback N/A format_callback N/A N/A ret N/A N/A format_callback obj N/A N/A ret N/A obj N/A children N/A N/A N/A N/A ret append children N/A ret N/A nested N/A N/A self format_callback N/A None N/A N/A 
        Return the graph as a nested list.
         N/A seen N/A set N/A roots N/A N/A root N/A N/A N/A self edges get None N/A N/A N/A N/A N/A roots extend N/A N/A self _nested root seen format_callback N/A roots N/A can_fast_delete N/A N/A self N/A args kwargs N/A N/A 
        We always want to load the objects into memory so that we can display
        them to the user in confirm page.
         N/A False N/A N/A PolymorphicAwareNestedObjects N/A NestedObjects N/A collect N/A N/A self objs source_attr N/A None kwargs N/A N/A N/A hasattr objs non_polymorphic N/A N/A objs N/A N/A N/A N/A objs non_polymorphic filter N/A N/A N/A N/A super PolymorphicAwareNestedObjects self collect objs source_attr source_attr kwargs N/A N/A