Population strategies
Sibyx opened this issue · comments
Jakub Dubec commented
Is your feature request related to a problem? Please describe.
I need to override default behaviour for specific form fields in Form.fill
method
Describe the solution you'd like
I would like to introduce field fill strategies, which could be overrided like this:
DJANGO_API_FORMS = {
'FILL_STRATEGIES': {
'django.forms.CharField': 'apps.api.forms.strategies.CharFieldStrategy',
'django.forms.ModelMultipleChoiceField': 'django_api_forms.strategies.ModelMultipleChoiceFieldReplaceStrategy',
'apps.api.forms.fields.LocalisationField': 'apps.api.forms.strategies.LocalisationStrategy'
}
}
Jakub Dubec commented
Resolved in #30