betty.attrs.locale module¶
Locale attributes.
- class betty.attrs.locale.HasLocale¶
Bases:
Localized,LinkedDataDumpableWithSchemaJsonLdObject,HasPropsA resource that is localized, e.g. contains information in a specific locale.
- async classmethod linked_data_schema(project: Project, /) JsonLdObject¶
Define the JSON Schema for
betty.linked_data.LinkedDataDumpable.dump_linked_data().
- locale¶
Make another attribute optional, e.g. allow
None.
- betty.attrs.locale.new_locale_attr(*, label: ResolvableLocalizable | None = None, description: ResolvableLocalizable | None = None) SettableAttr[HasProps, Locale, ResolvableLocale]¶
Create an attribute containing a locale.