Module ImportFrom alias ImportFrom alias ImportFrom alias alias ImportFrom alias ImportFrom alias alias alias alias alias alias alias alias alias alias alias alias alias alias alias alias alias alias alias alias alias alias alias ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr ListLoad NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr ListLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword Num keyword Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str keyword Str keyword Str keyword Str keyword NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str Expr Call AttributeLoad NameLoad attr Num Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str AttributeLoad SubscriptLoad NameLoad Index Num attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str keyword NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr BinOpBitOr Call NameLoad keyword Str Call NameLoad keyword Str Expr Call AttributeLoad NameLoad attr CompareIn NameLoad NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr BinOpBitOr Call NameLoad keyword Str Call NameLoad keyword Str Expr Call AttributeLoad NameLoad attr CompareIn NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str attr keyword Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad Call NameLoad AttributeLoad NameLoad attr attr Str Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad Assign NameStore Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr Str FunctionDef arguments args NameParam defaults body Return Call NameLoad ListComp NameLoad comprehension NameStore NameLoad CompareEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Num Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Num Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad keyword Str Assign NameStore Call NameLoad keyword Str keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str TryExcept body Assign NameStore Call NameLoad keyword Str keyword NameLoad handlers ExceptHandler type NameLoad name NameStore body If BoolOpAnd Call NameLoad Call NameLoad NameLoad NameLoad CompareEq Call NameLoad NameLoad Str body Expr Call AttributeLoad NameLoad attr Str Raise NameLoad Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str Assign NameStore Call NameLoad keyword Str keyword NameLoad Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str Assign NameStore Call NameLoad keyword Str keyword NameLoad Expr Call AttributeLoad NameLoad attr decorator_list Call NameLoad Str FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad ListLoad NameLoad Lambda arguments args NameParam defaults NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad ListLoad NameLoad Lambda arguments args NameParam defaults NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad ListLoad NameLoad Lambda arguments args NameParam defaults NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad ListLoad NameLoad Lambda arguments args NameParam defaults NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad keyword NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad ListLoad NameLoad NameLoad Lambda arguments args NameParam defaults NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad ListLoad NameLoad Lambda arguments args NameParam defaults NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad keyword NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad keyword NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad ListLoad NameLoad Lambda arguments args NameParam defaults NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad ListLoad NameLoad NameLoad NameLoad Lambda arguments args NameParam defaults NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad ListLoad NameLoad NameLoad Lambda arguments args NameParam defaults NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad ListLoad NameLoad Lambda arguments args NameParam defaults NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr Str Call AttributeLoad Call NameLoad AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad attr attr Expr Call AttributeLoad NameLoad attr Str Call AttributeLoad Call NameLoad AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad attr attr Expr Call AttributeLoad NameLoad attr Str Call AttributeLoad Call NameLoad AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad NameLoad keyword Str Assign NameStore Call NameLoad Expr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr Assign NameStore Call NameLoad Dict Str NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Assign NameStore AttributeLoad SubscriptLoad Call AttributeLoad AttributeLoad NameLoad attr attr Str Index Num attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num decorator_list decorator_list
N/A django.db.models Q django.db.utils IntegrityError django.test TestCase skipIfDBFeature django.forms.models modelform_factory models Address Place Restaurant Link CharLink TextLink Person Contact Note Organization OddRelation1 OddRelation2 Company Developer Team Guild Tag Board HasLinkThing A B C D GenericRelationTests N/A TestCase N/A test_inherited_models_content_type N/A N/A self N/A N/A N/A 
        Test that GenericRelations on inherited classes use the correct content
        type.
         N/A p N/A N/A N/A Place objects create name South Park N/A r N/A N/A N/A Restaurant objects create name Chubby's N/A l1 N/A N/A N/A Link objects create content_object p N/A l2 N/A N/A N/A Link objects create content_object r N/A N/A N/A self assertEqual N/A list N/A N/A N/A p links all N/A l1 N/A N/A N/A self assertEqual N/A list N/A N/A N/A r links all N/A l2 N/A test_reverse_relation_pk N/A N/A self N/A N/A N/A 
        Test that the correct column name is used for the primary key on the
        originating model of a query.  See #12664.
         N/A p N/A N/A N/A Person objects create account 23 name Chef N/A N/A N/A N/A Address objects create street 123 Anywhere Place city Conifer state CO zipcode 80433 content_object p N/A qs N/A N/A N/A Person objects filter addresses__zipcode 80433 N/A N/A N/A self assertEqual 1 N/A N/A qs count N/A N/A N/A self assertEqual Chef N/A N/A qs N/A 0 name N/A test_charlink_delete N/A N/A self N/A N/A N/A oddrel N/A N/A N/A OddRelation1 objects create name clink N/A N/A N/A N/A CharLink objects create content_object oddrel N/A N/A N/A oddrel delete N/A test_textlink_delete N/A N/A self N/A N/A N/A oddrel N/A N/A N/A OddRelation2 objects create name tlink N/A N/A N/A N/A TextLink objects create content_object oddrel N/A N/A N/A oddrel delete N/A test_q_object_or N/A N/A self N/A N/A N/A 
        Tests that SQL query parameters for generic relations are properly
        grouped when OR is used.

        Test for bug http://code.djangoproject.com/ticket/11535

        In this bug the first query (below) works while the second, with the
        query parameters the same but in reverse order, does not.

        The issue is that the generic relation conditions do not get properly
        grouped in parentheses.
         N/A note_contact N/A N/A N/A Contact objects create N/A org_contact N/A N/A N/A Contact objects create N/A N/A N/A N/A Note objects create note note content_object note_contact N/A org N/A N/A N/A Organization objects create name org name N/A N/A N/A N/A org contacts add org_contact N/A qs N/A N/A N/A Contact objects filter N/A N/A Q notes__note__icontains other note N/A Q organizations__name__icontains org name N/A N/A N/A self assertTrue N/A org_contact qs N/A qs N/A N/A N/A Contact objects filter N/A N/A Q organizations__name__icontains org name N/A Q notes__note__icontains other note N/A N/A N/A self assertTrue N/A org_contact qs N/A test_join_reuse N/A N/A self N/A N/A N/A qs N/A N/A N/A N/A N/A Person objects filter addresses__street foo filter addresses__street bar N/A N/A N/A self assertEqual N/A N/A N/A str N/A qs query count JOIN 2 N/A test_generic_relation_ordering N/A N/A self N/A N/A N/A 
        Test that ordering over a generic relation does not include extraneous
        duplicate results, nor excludes rows not participating in the relation.
         N/A p1 N/A N/A N/A Place objects create name South Park N/A p2 N/A N/A N/A Place objects create name The City N/A c N/A N/A N/A Company objects create name Chubby's Intl. N/A N/A N/A N/A Link objects create content_object p1 N/A N/A N/A N/A Link objects create content_object c N/A places N/A list N/A N/A N/A Place objects order_by links__id count_places N/A N/A place N/A N/A N/A N/A len N/A p N/A p places N/A N/A p id N/A place id N/A N/A N/A N/A self assertEqual N/A len places 2 N/A N/A N/A self assertEqual N/A count_places p1 1 N/A N/A N/A self assertEqual N/A count_places p2 1 N/A test_target_model_is_unsaved N/A N/A self N/A N/A N/A Test related to #13085 N/A dev1 N/A Developer name Joe N/A note N/A Note note Deserves promotion content_object dev1 N/A N/A N/A self assertRaises IntegrityError N/A note save N/A test_target_model_len_zero N/A N/A self N/A N/A N/A Test for #13085 -- __len__() returns 0 N/A team1 N/A N/A N/A Team objects create name Backend devs N/A N/A N/A note N/A Note note Deserve a bonus content_object team1 N/A N/A N/A Exception N/A e N/A N/A N/A N/A issubclass N/A type e Exception N/A N/A str e Impossible arguments to GFK.get_content_type! N/A N/A N/A N/A self fail Saving model with GenericForeignKey to model instance whose __len__ method returns 0 shouldn't fail. N/A e N/A N/A N/A note save N/A test_target_model_nonzero_false N/A N/A self N/A N/A N/A Test related to #13085 N/A g1 N/A N/A N/A Guild objects create name First guild N/A note N/A Note note Note for guild content_object g1 N/A N/A N/A note save N/A test_gfk_to_model_with_empty_pk N/A N/A self N/A N/A N/A Test related to #13085 N/A b1 N/A N/A N/A Board objects create name N/A tag N/A Tag label VP content_object b1 N/A N/A N/A tag save N/A N/A skipIfDBFeature interprets_empty_strings_as_nulls test_ticket_20378 N/A N/A self N/A N/A N/A hs1 N/A N/A N/A HasLinkThing objects create N/A hs2 N/A N/A N/A HasLinkThing objects create N/A l1 N/A N/A N/A Link objects create content_object hs1 N/A l2 N/A N/A N/A Link objects create content_object hs2 N/A N/A N/A self assertQuerysetEqual N/A N/A N/A HasLinkThing objects filter links l1 N/A hs1 N/A N/A N/A x N/A x N/A N/A N/A self assertQuerysetEqual N/A N/A N/A HasLinkThing objects filter links l2 N/A hs2 N/A N/A N/A x N/A x N/A N/A N/A self assertQuerysetEqual N/A N/A N/A HasLinkThing objects exclude links l2 N/A hs1 N/A N/A N/A x N/A x N/A N/A N/A self assertQuerysetEqual N/A N/A N/A HasLinkThing objects exclude links l1 N/A hs2 N/A N/A N/A x N/A x N/A test_ticket_20564 N/A N/A self N/A N/A N/A b1 N/A N/A N/A B objects create N/A b2 N/A N/A N/A B objects create N/A b3 N/A N/A N/A B objects create N/A c1 N/A N/A N/A C objects create b b1 N/A c2 N/A N/A N/A C objects create b b2 N/A c3 N/A N/A N/A C objects create b b3 N/A N/A N/A N/A A objects create flag None content_object b1 N/A N/A N/A N/A A objects create flag True content_object b2 N/A N/A N/A self assertQuerysetEqual N/A N/A N/A C objects filter b__a__flag None N/A c1 c3 N/A N/A N/A x N/A x N/A N/A N/A self assertQuerysetEqual N/A N/A N/A C objects exclude b__a__flag None N/A c2 N/A N/A N/A x N/A x N/A test_ticket_20564_nullable_fk N/A N/A self N/A N/A N/A b1 N/A N/A N/A B objects create N/A b2 N/A N/A N/A B objects create N/A b3 N/A N/A N/A B objects create N/A d1 N/A N/A N/A D objects create b b1 N/A d2 N/A N/A N/A D objects create b b2 N/A d3 N/A N/A N/A D objects create b b3 N/A d4 N/A N/A N/A D objects create N/A N/A N/A N/A A objects create flag None content_object b1 N/A N/A N/A N/A A objects create flag True content_object b1 N/A N/A N/A N/A A objects create flag True content_object b2 N/A N/A N/A self assertQuerysetEqual N/A N/A N/A D objects exclude b__a__flag None N/A d2 N/A N/A N/A x N/A x N/A N/A N/A self assertQuerysetEqual N/A N/A N/A D objects filter b__a__flag None N/A d1 d3 d4 N/A N/A N/A x N/A x N/A N/A N/A self assertQuerysetEqual N/A N/A N/A B objects filter a__flag None N/A b1 b3 N/A N/A N/A x N/A x N/A N/A N/A self assertQuerysetEqual N/A N/A N/A B objects exclude a__flag None N/A b2 N/A N/A N/A x N/A x N/A test_extra_join_condition N/A N/A self N/A N/A N/A N/A N/A self assertIn content_type_id N/A N/A N/A str N/A N/A N/A N/A B objects exclude a__flag None query lower N/A N/A N/A self assertNotIn  join  N/A N/A N/A str N/A N/A N/A N/A B objects exclude a__flag True query lower N/A N/A N/A self assertIn content_type_id N/A N/A N/A str N/A N/A N/A N/A B objects exclude a__flag True query lower N/A test_editable_generic_rel N/A N/A self N/A N/A N/A GenericRelationForm N/A modelform_factory HasLinkThing fields __all__ N/A form N/A GenericRelationForm N/A N/A N/A self assertIn links N/A form fields N/A form N/A GenericRelationForm N/A links None N/A N/A N/A self assertTrue N/A N/A form is_valid N/A N/A N/A form save N/A links N/A N/A N/A N/A N/A HasLinkThing _meta get_field_by_name links N/A 0 field N/A N/A N/A self assertEqual N/A links save_form_data_calls 1 N/A N/A