openedx.core.djangoapps.content.block_structure.config package#

Submodules#

openedx.core.djangoapps.content.block_structure.config.models module#

Models for configuration of Block Structures.

class openedx.core.djangoapps.content.block_structure.config.models.BlockStructureConfiguration(*args, **kwargs)#

Bases: ConfigurationModel

Configuration model for Block Structures.

DEFAULT_CACHE_TIMEOUT_IN_SECONDS = 86400#
DEFAULT_PRUNE_KEEP_COUNT = 5#
exception DoesNotExist#

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned#

Bases: MultipleObjectsReturned

cache_timeout_in_seconds#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

change_date#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

changed_by#

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.

changed_by_id#
enabled#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

get_next_by_change_date(*, field=<django.db.models.fields.DateTimeField: change_date>, is_next=True, **kwargs)#
get_previous_by_change_date(*, field=<django.db.models.fields.DateTimeField: change_date>, is_next=False, **kwargs)#
id#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

num_versions_to_keep#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

Module contents#

This module contains various configuration settings via waffle switches for the Block Structure framework.

openedx.core.djangoapps.content.block_structure.config.cache_timeout_in_seconds()#

Returns and caches the current setting for cache_timeout_in_seconds.

openedx.core.djangoapps.content.block_structure.config.num_versions_to_keep()#

Returns and caches the current setting for num_versions_to_keep.