Documentation
¶
Index ¶
- type BaseRelationField
- type ForeignKeyFormField
- type ManyToManyFormField
- type ModelSelect
- func (o *ModelSelect) GetContextData(ctx context.Context, id, name string, value interface{}, ...) ctx.Context
- func (b *ModelSelect) Render(ctx context.Context, w io.Writer, id, name string, value interface{}, ...) error
- func (b *ModelSelect) Validate(ctx context.Context, value interface{}) []error
- func (f *ModelSelect) ValueToForm(value interface{}) interface{}
- func (f *ModelSelect) ValueToGo(value interface{}) (interface{}, error)
- type MultiSelectWidget
- func (o *MultiSelectWidget[T]) Choices(ctx context.Context) []widgets.Option
- func (o *MultiSelectWidget[T]) GetContextData(ctx context.Context, id, name string, value interface{}, ...) ctx.Context
- func (m *MultiSelectWidget[T]) Media() media.Media
- func (o *MultiSelectWidget[T]) Validate(ctx context.Context, value interface{}) []error
- func (m *MultiSelectWidget[T]) ValueFromDataDict(ctx context.Context, data url.Values, files map[string][]filesystem.FileHeader, ...) (interface{}, []error)
- func (m *MultiSelectWidget[T]) ValueOmittedFromData(ctx context.Context, data url.Values, files map[string][]filesystem.FileHeader, ...) bool
- func (o *MultiSelectWidget[T]) ValueToGo(value interface{}) (interface{}, error)
- type OneToOneFormField
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseRelationField ¶
type BaseRelationField struct { *django_formfields.BaseField Field attrs.FieldDefinition Relation attrs.Relation }
type ForeignKeyFormField ¶
type ForeignKeyFormField struct {
BaseRelationField
}
func (*ForeignKeyFormField) HasChanged ¶
func (f *ForeignKeyFormField) HasChanged(initial, data interface{}) bool
func (*ForeignKeyFormField) ValueToForm ¶
func (f *ForeignKeyFormField) ValueToForm(value interface{}) interface{}
func (*ForeignKeyFormField) ValueToGo ¶
func (f *ForeignKeyFormField) ValueToGo(value interface{}) (interface{}, error)
func (*ForeignKeyFormField) Widget ¶
func (f *ForeignKeyFormField) Widget() widgets.Widget
type ManyToManyFormField ¶
type ManyToManyFormField struct {
BaseRelationField
}
func (*ManyToManyFormField) Widget ¶
func (o *ManyToManyFormField) Widget() widgets.Widget
type ModelSelect ¶
type ModelSelect struct { *chooser.BaseChooser ExcludeBlank bool BlankLabel string }
func ModelSelectWidget ¶
func ModelSelectWidget(allowBlank bool, blankLabel string, opts chooser.BaseChooserOptions, attrs map[string]string) *ModelSelect
func (*ModelSelect) GetContextData ¶
func (*ModelSelect) Validate ¶
func (b *ModelSelect) Validate(ctx context.Context, value interface{}) []error
func (*ModelSelect) ValueToForm ¶
func (f *ModelSelect) ValueToForm(value interface{}) interface{}
func (*ModelSelect) ValueToGo ¶
func (f *ModelSelect) ValueToGo(value interface{}) (interface{}, error)
type MultiSelectWidget ¶
type MultiSelectWidget[T attrs.Definer] struct { *widgets.BaseWidget Queryset func() *queries.QuerySet[T] Relation attrs.Relation FieldDef attrs.FieldDefinition IncludeBlank bool BlankLabel string }
func (*MultiSelectWidget[T]) Choices ¶
func (o *MultiSelectWidget[T]) Choices(ctx context.Context) []widgets.Option
func (*MultiSelectWidget[T]) GetContextData ¶
func (*MultiSelectWidget[T]) Media ¶
func (m *MultiSelectWidget[T]) Media() media.Media
func (*MultiSelectWidget[T]) Validate ¶
func (o *MultiSelectWidget[T]) Validate(ctx context.Context, value interface{}) []error
func (*MultiSelectWidget[T]) ValueFromDataDict ¶
func (m *MultiSelectWidget[T]) ValueFromDataDict(ctx context.Context, data url.Values, files map[string][]filesystem.FileHeader, name string) (interface{}, []error)
func (*MultiSelectWidget[T]) ValueOmittedFromData ¶
func (m *MultiSelectWidget[T]) ValueOmittedFromData(ctx context.Context, data url.Values, files map[string][]filesystem.FileHeader, name string) bool
func (*MultiSelectWidget[T]) ValueToGo ¶
func (o *MultiSelectWidget[T]) ValueToGo(value interface{}) (interface{}, error)
type OneToOneFormField ¶
type OneToOneFormField struct {
BaseRelationField
}
Click to show internal directories.
Click to hide internal directories.