horizon package

Submodules

horizon.manager module

class horizon.manager.HorizontalManager[source]

Bases: django.db.models.manager.ManagerFromQuerySet

use_in_migrations = True

horizon.models module

class horizon.models.AbstractHorizontalMetadata(*args, **kwargs)[source]

Bases: django.db.models.base.Model

class Meta[source]

Bases: object

abstract = False
unique_together = (('group', 'key'),)
group

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

index

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

key

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

class horizon.models.AbstractHorizontalModel(*args, **kwargs)[source]

Bases: django.db.models.base.Model

class Meta[source]

Bases: object

abstract = False
horizontal_group = None
horizontal_key = None
classmethod check(**kwargs)[source]
id

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

objects

horizon.query module

class horizon.query.HorizontalQuerySetMixin(model=None, **kwargs)[source]

Bases: object

create(**kwargs)[source]
db
class horizon.query.QuerySet(model=None, **kwargs)[source]

Bases: horizon.query.HorizontalQuerySetMixin, django.db.models.query.QuerySet

horizon.routers module

class horizon.routers.HorizontalRouter[source]

Bases: object

allow_migrate(db, app_label, model_name=None, **hints)[source]
allow_relation(obj1, obj2, **hints)[source]
db_for_read(model, **hints)[source]
db_for_write(model, **hints)[source]

horizon.settings module

horizon.settings.get_config[source]

horizon.utils module

horizon.utils.get_config_from_group(horizontal_group)[source]
horizon.utils.get_config_from_model(model)[source]
horizon.utils.get_db_for_read_from_model_index(model, index)[source]
horizon.utils.get_db_for_write_from_model_index(model, index)[source]
horizon.utils.get_group_from_model(model)[source]
horizon.utils.get_key_field_name_from_model(model)[source]
horizon.utils.get_metadata_model()[source]
horizon.utils.get_or_create_index(model, horizontal_key)[source]

Module contents