Skip to content

FeatureSection ​

Overview ​

A namespaced section that a feature app contributes to class Vueda.

name matches the nested class an author writes, exactly. app_label is the Django app label of the owning feature app. validate runs after option resolution and returns error messages for rules that span options. A failed section is reported by system checks and never reaches contribute. contribute runs once per concrete model, right after Django prepares it, and may call model.add_to_class() to add fields or other behaviour.

contribute_order sequences the contributors, lowest first, with section name breaking a tie. A feature that reads the finished field list must sort after every feature that adds a field, or it sees a model that is still being assembled.

__init__ ​

Signature ​

__init__(name, app_label, options, validate, contribute, contribute_order)

Parameters ​

NameTypeRequiredDefaultDescription
namestryes
app_labelstryes
optionscollections.abc.Mapping[str, vueda.core.features.FeatureOption]no<factory>
validatecollections.abc.Callable[[type, collections.abc.Mapping[str, typing.Any]], collections.abc.Iterable[str]] | NonenoNone
contributecollections.abc.Callable[[type, typing.Any], None] | NonenoNone
contribute_orderintno0

Source ​

<string>

app_label ​

contribute ​

contribute_order ​

name ​

options ​

validate ​

Source ​

server/vueda/core/features.py:48