nested_admin.tests.three_deep package¶
Submodules¶
nested_admin.tests.three_deep.admin module¶
-
class
LevelOneInline(*args, **kwargs)[source]¶ Bases:
nested_admin.nested.NestedStackedInline-
extra= 1¶
-
inline_classes= ('collapse', 'open', 'grp-collapse', 'grp-open')¶
-
inlines= [<class 'nested_admin.tests.three_deep.admin.LevelTwoInline'>]¶
-
media¶
-
model¶
-
sortable_field_name= 'position'¶
-
-
class
LevelThreeInline(*args, **kwargs)[source]¶ Bases:
nested_admin.nested.NestedStackedInline-
extra= 1¶
-
inline_classes= ('collapse', 'open', 'grp-collapse', 'grp-open')¶
-
media¶
-
model¶
-
sortable_field_name= 'position'¶
-
-
class
LevelTwoInline(*args, **kwargs)[source]¶ Bases:
nested_admin.nested.NestedStackedInline-
extra= 1¶
-
inline_classes= ('collapse', 'open', 'grp-collapse', 'grp-open')¶
-
inlines= [<class 'nested_admin.tests.three_deep.admin.LevelThreeInline'>]¶
-
media¶
-
model¶
-
sortable_field_name= 'position'¶
-
-
class
TopLevelAdmin(model, admin_site)[source]¶ Bases:
nested_admin.nested.NestedModelAdmin-
inlines= [<class 'nested_admin.tests.three_deep.admin.LevelOneInline'>]¶
-
media¶
-
nested_admin.tests.three_deep.models module¶
-
class
LevelOne(id, name, parent_level, position)[source]¶ Bases:
django.db.models.base.Model-
exception
DoesNotExist¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
children¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
parent.childrenis aReverseManyToOneDescriptorinstance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
-
id¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
name¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
objects= <django.db.models.manager.Manager object>¶
-
parent_level¶ Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
child.parentis aForwardManyToOneDescriptorinstance.
-
parent_level_id¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
position¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
exception
-
class
LevelThree(id, name, parent_level, position)[source]¶ Bases:
django.db.models.base.Model-
exception
DoesNotExist¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
id¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
name¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
objects= <django.db.models.manager.Manager object>¶
-
parent_level¶ Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
child.parentis aForwardManyToOneDescriptorinstance.
-
parent_level_id¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
position¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
exception
-
class
LevelTwo(id, name, parent_level, position)[source]¶ Bases:
django.db.models.base.Model-
exception
DoesNotExist¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
children¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
parent.childrenis aReverseManyToOneDescriptorinstance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
-
id¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
name¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
objects= <django.db.models.manager.Manager object>¶
-
parent_level¶ Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
child.parentis aForwardManyToOneDescriptorinstance.
-
parent_level_id¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
position¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
exception
-
class
TopLevel(id, name)[source]¶ Bases:
django.db.models.base.Model-
exception
DoesNotExist¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
children¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
parent.childrenis aReverseManyToOneDescriptorinstance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
-
id¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
name¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
objects= <django.db.models.manager.Manager object>¶
-
exception
nested_admin.tests.three_deep.tests module¶
-
class
TestDeepNesting(methodName='runTest')[source]¶ Bases:
nested_admin.tests.base.BaseNestedAdminTestCase-
nested_models= (<class 'nested_admin.tests.three_deep.models.LevelOne'>, <class 'nested_admin.tests.three_deep.models.LevelTwo'>, <class 'nested_admin.tests.three_deep.models.LevelThree'>)¶
-
root_model¶
-
-
class
TestNestedPermissions(methodName='runTest')[source]¶ Bases:
nested_admin.tests.base.BaseNestedAdminTestCase-
auto_login= False¶
-
nested_models= (<class 'nested_admin.tests.three_deep.models.LevelOne'>, <class 'nested_admin.tests.three_deep.models.LevelTwo'>, <class 'nested_admin.tests.three_deep.models.LevelThree'>)¶
-
root_model¶
-