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

alias of nested_admin.tests.three_deep.models.LevelOne

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

alias of nested_admin.tests.three_deep.models.LevelThree

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

alias of nested_admin.tests.three_deep.models.LevelTwo

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.children is a ReverseManyToOneDescriptor instance.

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.parent is a ForwardManyToOneDescriptor instance.

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.

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.parent is a ForwardManyToOneDescriptor instance.

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.

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.children is a ReverseManyToOneDescriptor instance.

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.parent is a ForwardManyToOneDescriptor instance.

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.

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.children is a ReverseManyToOneDescriptor instance.

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>

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

alias of nested_admin.tests.three_deep.models.TopLevel

classmethod setUpClass()[source]

Hook method for setting up class fixture before running tests in the class.

test_create_new()[source]
test_create_new_no_extras()[source]
test_save_missing_intermediate_inline()[source]
test_validationerror_on_empty_extra_parent_form()[source]
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

alias of nested_admin.tests.three_deep.models.TopLevel

setUp()[source]

Hook method for setting up the test fixture before exercising it.

classmethod setUpClass()[source]

Hook method for setting up class fixture before running tests in the class.

test_user_lacks_parent_permissions_can_add()[source]
test_user_lacks_parent_permissions_can_delete()[source]

Module contents